CN108391097A - A kind of video image method for uploading, device and computer storage media - Google Patents
A kind of video image method for uploading, device and computer storage media Download PDFInfo
- Publication number
- CN108391097A CN108391097A CN201810374233.6A CN201810374233A CN108391097A CN 108391097 A CN108391097 A CN 108391097A CN 201810374233 A CN201810374233 A CN 201810374233A CN 108391097 A CN108391097 A CN 108391097A
- Authority
- CN
- China
- Prior art keywords
- video image
- current video
- gray
- pixel
- value
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/18—Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N5/00—Details of television systems
- H04N5/14—Picture signal circuitry for video frequency region
- H04N5/144—Movement detection
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The present invention is suitable for software field, provides a kind of video image method for uploading, device and computer storage media, including:Obtain the current video image of monitor video and previous video image;Gray processing processing is carried out to current video image and previous video image, after the completion of waiting for gray processing processing, the gray value of pixel in current video image is obtained, obtains the gray value of pixel in previous video image;According to the gray value of pixel in the gray value of pixel in preset gray average deviation model, current video image and previous video image, the relative deviation of the gray average of current video image is generated;Judge whether relative deviation is more than predetermined threshold value;When relative deviation is more than predetermined threshold value, current video image is judged for motion video image, uploads current video image;When relative deviation is not more than predetermined threshold value, current video image is not uploaded.The present invention can substantially reduce the code stream of monitor video, can improve the utilization rate of video image uploading bandwidth.
Description
Technical field
The invention belongs to a kind of software field more particularly to video image method for uploading, device and computer storage medias.
Background technology
Increasingly perfect with overall control of social public security mode, government establishes video monitoring, and video monitoring is being safeguarded
Social security, disaster prevention accident, reduction country, collective property and people's life etc. play general risk prevention instruments and are difficult to
Or can not possibly play the role of, be prevent and fight crime and disaster prevention accident occur sharp keen weapon.Either room
It is interior or outdoor, it can be seen that the figure of video monitoring.Video monitoring refers to utilizing monitoring camera, to some monitoring area
Video acquisition is carried out, video monitoring can be the backtracking and analysis of late events, provide corresponding video data.
In order to provide reliable video data, need all to record each frame video image of monitor video.But
All there is a phenomenon in view of the video monitoring of Most current, which is the most of the time of video to be in static shape
State, i.e. monitoring area are in Same Scene state within the most of the time.And the stationary video image to remain static for
The backtracking of late events occupies a large amount of upload resource instead without reference to value, for example, a 8 road video monitorings storages
Space be about 17T monthly, get off within three months about to occupy the hard drive space of 50T, if by all video figures of monitor video
As all uploading, it will cause the wastes of a large amount of code stream, and then reduce the utilization rate of video image uploading bandwidth, therefore how to improve
The utilization rate of video image uploading bandwidth is this field urgent problem to be solved.
Invention content
In view of this, an embodiment of the present invention provides a kind of video image method for uploading, device and computer storage media,
All video images of monitor video are all uploaded with solving the prior art, cause a large amount of code stream to waste, and then reduce and regard
The problem of utilization rate of frequency image uploading bandwidth.
The first aspect of the embodiment of the present invention provides a kind of video image method for uploading, including:
Obtain the current video image of monitor video and previous video image;
Gray processing processing is carried out to the current video image and the previous video image, waits for that gray processing processing is completed
Afterwards, the gray value of pixel in the current video image is obtained, the gray value of pixel in the previous video image is obtained;
Deviate model according to preset gray average, in the current video image gray value of pixel and it is described before
The gray value of pixel in one video image, generates the relative deviation of the gray average of the current video image;
Judge whether the relative deviation is more than predetermined threshold value;
When the relative deviation is more than the predetermined threshold value, judge the current video image for the sport video figure
Picture uploads the current video image;
When the relative deviation is not more than the predetermined threshold value, judge the current video image for non-athletic video figure
Picture does not upload the current video image;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video figure
Departure degree of the gray average of picture for the gray average of previous video image;I indicates the serial number of pixel, i value ranges
It is 1 to N, N is the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;It indicates
The sum of the gray value of the current video image,Indicate the gray average of the current video image;Pi[c-
1] gray value of pixel i in previous video image is indicated;Indicate previous video image gray value it
With,Indicate the gray average of previous video image.
As a kind of realization method of the present embodiment, when the relative deviation is more than the predetermined threshold value, described in judgement
Current video image is the motion video image, uploads the current video image, specially:
When the relative deviation is more than the predetermined threshold value, identify that the current video image is the sport video figure
Picture, the value that setting uploads flag bit are 1;
Using Huffman Compress Algorithm, the current video image is compressed, generates video image compression packet;
The distributed memory system based on distributed hashtable DHT overlay networks is connected, the video image compression is wrapped
Reach preset memory node.
As a kind of realization method of the present embodiment, the distribution of the connection based on distributed hashtable DHT overlay networks
The video image compression is wrapped and reaches preset memory node, specially by storage system:
The distributed memory system based on distributed hashtable DHT overlay networks is connected, using the communication pattern of setting, by institute
It states video image compression and wraps and reach preset memory node.
As a kind of realization method of the present embodiment, the communication pattern of the setting includes WIFI communication patterns, 4G communications
At least one of pattern, 5G communication patterns.
The second aspect of the embodiment of the present invention provides a kind of video image upload device, including:
Video image acquisition module, the current video image for obtaining monitor video and previous video image;
Gray value acquisition module, for being carried out at gray processing to the current video image and the previous video image
Reason obtains the gray value of pixel in the current video image after the completion of waiting for gray processing processing, obtains the previous video figure
The gray value of pixel as in;
Relative deviation generation module, for deviateing picture in model, the current video image according to preset gray average
The gray value of pixel, the gray scale for generating the current video image are equal in the gray value of vegetarian refreshments and the previous video image
The relative deviation of value;
Judgment module, for judging whether the relative deviation is more than predetermined threshold value;
Video image uploading module, for when the relative deviation is more than the predetermined threshold value, working as forward sight described in judgement
Frequency image is the motion video image, uploads the current video image;
Video image not uploading module, for when the relative deviation is not more than the predetermined threshold value, working as described in judgement
Preceding video image is non-athletic video image, does not upload the current video image;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video figure
Departure degree of the gray average of picture for the gray average of previous video image;I indicates the serial number of pixel, i value ranges
It is 1 to N, N is the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;It indicates
The sum of the gray value of the current video image,Indicate the gray average of the current video image;Pi[c-
1] gray value of pixel i in previous video image is indicated;Indicate previous video image gray value it
With,Indicate the gray average of previous video image.
As a kind of realization method of the present embodiment, the video image uploading module specifically includes:
Setting unit, for when the relative deviation is more than the predetermined threshold value, identifying that the current video image is
The motion video image, the value that setting uploads flag bit are 1;
Video image compression unit compresses the current video image, life for using Huffman Compress Algorithm
At video image compression packet;
Video image uploading unit will for connecting the distributed memory system based on distributed hashtable DHT overlay networks
The video image compression, which is wrapped, reaches preset memory node;
Wherein, the distributed memory system of the connection based on distributed hashtable DHT overlay networks, by the video image
Compressed package is uploaded to preset memory node, specially:
The distributed memory system based on distributed hashtable DHT overlay networks is connected, using the communication pattern of setting, by institute
It states video image compression and wraps and reach preset memory node;
Wherein, the communication pattern of the setting include in WIFI communication patterns, 4G communication patterns, 5G communication patterns at least
It is a kind of.
As a kind of realization method of the present embodiment, the video image not uploading module is specifically used for:
When the relative deviation is not more than the predetermined threshold value, judge the current video image for non-athletic video figure
Picture, the value that setting uploads flag bit is 0, does not upload the current video image.
The third aspect of the embodiment of the present invention provide a kind of video image upload device, including memory, processor with
And it is stored in the computer program that can be run in the memory and on the processor, the processor executes the calculating
The step of above method is realized when machine program.
The fourth aspect of the embodiment of the present invention provides a kind of computer storage media, the computer storage media storage
The step of having computer program, the above method is realized when the computer program is executed by processor.
Existing advantageous effect is the embodiment of the present invention compared with prior art:
The moving image for only uploading monitor video without all uploading all video images of monitor video, therefore is kept away
A large amount of code stream waste is exempted from, the utilization rate of video image uploading bandwidth can be improved.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of video image method for uploading provided in an embodiment of the present invention;
Fig. 2 is the structure diagram that video image provided in an embodiment of the present invention uploads device;
Fig. 3 is the schematic diagram that video image provided in an embodiment of the present invention uploads device.
Specific implementation mode
In being described below, for illustration and not for limitation, it is proposed that such as tool of particular system structure, technology etc
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention can also be realized in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
It should be appreciated that ought use in this specification and in the appended claims, the instruction of term " comprising " is described special
Sign, entirety, step, operation, the presence of element and/or component, but be not precluded one or more of the other feature, entirety, step,
Operation, element, component and/or its presence or addition gathered.
It is also understood that the term used in this description of the invention is merely for the sake of the mesh for describing specific embodiment
And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on
Other situations are hereafter clearly indicated, otherwise " one " of singulative, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is
Refer to any combinations and all possible combinations of one or more of associated item listed, and includes these combinations.
As used in this specification and in the appended claims, term " if " can be according to context quilt
Be construed to " when ... " or " once " or " in response to determination " or " in response to detecting ".Similarly, phrase " if it is determined that " or
" if detecting [described condition or event] " can be interpreted to mean according to context " once it is determined that " or " in response to true
It is fixed " or " once detecting [described condition or event] " or " in response to detecting [described condition or event] ".
In the specific implementation, the terminal device described in the embodiment of the present invention is including but not limited to such as with the sensitive table of touch
Mobile phone, laptop computer or the tablet computer in face (for example, touch-screen display and/or touch tablet) etc it is other
Portable device.It is to be further understood that in certain embodiments, the equipment is not portable communication device, but is had
The desktop computer of touch sensitive surface (for example, touch-screen display and/or touch tablet).
In following discussion, the terminal device including display and touch sensitive surface is described.However, should manage
Solution, terminal device may include that one or more of the other physical User of such as physical keyboard, mouse and/or control-rod connects
Jaws equipment.
Terminal device supports various application programs, such as one of the following or multiple:Drawing application program, demonstration application
Program, word-processing application, website establishment application program, disk imprinting application program, spreadsheet applications, game are answered
With program, telephony application, videoconference application, email application, instant messaging applications, forging
Refining supports application program, photo management application program, digital camera application program, digital camera application program, web-browsing to answer
With program, digital music player application and/or video frequency player application program.
The various application programs that can be executed on the terminal device can use at least one of such as touch sensitive surface
Public physical user-interface device.It can be adjusted among applications and/or in corresponding application programs and/or change touch is quick
Feel the corresponding information shown in the one or more functions and terminal on surface.In this way, terminal public physical structure (for example,
Touch sensitive surface) it can support the various application programs with intuitive and transparent user interface for a user.
In order to illustrate technical solutions according to the invention, illustrated below by specific embodiment.
Embodiment one
With reference to figure 1, Fig. 1 is the implementation flow chart of video image method for uploading provided in an embodiment of the present invention, and this method is answered
For terminal device, video image method for uploading as shown in Figure 1 may comprise steps of:
S101 obtains the current video image of monitor video and previous video image;
Wherein, monitor video is the video uploaded, and the monitor video can be adopted by video acquisition device
The scenario of some period in collection monitoring area obtains.And above-mentioned present image can refer in above-mentioned monitor video
Any one frame video image.
S102 carries out gray processing processing to the current video image and the previous video image, waits for that gray processing is handled
After the completion, the gray value of pixel in the current video image is obtained, the ash of pixel in the previous video image is obtained
Angle value;
Wherein, previous video image refers to:The previous frame video image of current video image.If for example, working as forward sight
Frequency image is the M frame images of monitor video, then previous frame image is M-1 frame images, if current video image is monitoring
8th frame image of video, then previous frame image is the 7th frame image.
S103, model is deviateed according to preset gray average, in the current video image gray value of pixel and
The gray value of pixel, generates the relative deviation of the gray average of the current video image in the previous video image;
S104, judges whether the relative deviation is more than predetermined threshold value;
Wherein, predetermined threshold value can be user from setting, can also system default, be not limited herein, it is preferable that described pre-
If threshold value is 3%.
S105 judges the current video image for the movement when the relative deviation is more than the predetermined threshold value
Video image uploads the current video image;
Wherein, moving image refer to include moving object image.
Wherein, the mode of the upload of video image includes the mode that the mode uploaded frame by frame and multiframe upload, it is preferable that
For the mode of the upload of video image by the way of uploading frame by frame, it refers on a frame-by-frame basis uploading to upload frame by frame, when a frame uploads
After, then next frame is uploaded, in this way, in upload procedure, even if video image is whole by violence termination or due to disaster occurs
It only transmits, it is also ensured that the video image uploaded is readable frame by frame, to ensure that the video image of upload has
Effect property and reliability.
S106 judges the current video image to be non-athletic when the relative deviation is not more than the predetermined threshold value
Video image does not upload the current video image;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video figure
Departure degree of the gray average of picture for the gray average of previous video image;I indicates the serial number of pixel, i value ranges
It is 1 to N, N is the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;It indicates
The sum of the gray value of the current video image,Indicate the gray average of the current video image;Pi[c-
1] gray value of pixel i in previous video image is indicated;Indicate previous video image gray value it
With,Indicate the gray average of previous video image.
Wherein, the R indicates the relative deviation of the gray average of the current video image, described works as forward sight for describing
The gray average of frequency image for the gray average of previous video image departure degree, when the relative deviation be more than it is described pre-
If when threshold value, illustrating that current video image is different from previous video image, identify that there are moving objects in the current video image
Body judges that the current video image for the motion video image, uploads the current video image, if relative deviation,
When the relative deviation is more than the predetermined threshold value, illustrate that current video image is identical as previous video image, described in identification
Moving object is not present in current video image, judges the current video image not for the motion video image, does not upload
The current video image.
Wherein, by the resolution ratio of monitor video, the total number of pixel can be obtained.
In embodiments of the present invention, the moving image of monitor video is only uploaded, is not necessarily to all video figures of monitor video
As all uploading, therefore, the code stream of monitor video can be substantially reduced, a large amount of code stream is avoided to waste, and then reduce video image
The bandwidth of upload so that video image can upload in time, therefore, make full use of the uploading bandwidth needed for video image, can improve
The utilization rate of video image uploading bandwidth.
Embodiment two
Corresponding to the method described in foregoing embodiments one, with reference to figure 2, Fig. 2 is video image provided in an embodiment of the present invention
The structure diagram of device is uploaded, is applied to terminal device, terminal device includes but not limited to mobile phone, pocket computer
(Pocket Personal Computer, PPC), palm PC, computer, laptop, personal digital assistant
(Personal Digital Assistant, PDA), MP4, MP3.For purposes of illustration only, illustrating only related to the present embodiment
Part.For convenience of description, only the parts related to this embodiment are shown.
With reference to Fig. 2, which uploads device and includes:
Video image acquisition module 21, the current video image for obtaining monitor video and previous video image;
Gray value acquisition module 22, for being carried out at gray processing to the current video image and the previous video image
Reason obtains the gray value of pixel in the current video image after the completion of waiting for gray processing processing, obtains the previous video figure
The gray value of pixel as in;
Relative deviation generation module 23, for being deviateed in model, the current video image according to preset gray average
The gray value of pixel, generates the gray scale of the current video image in the gray value of pixel and the previous video image
The relative deviation of mean value;
Judgment module 24, for judging whether the relative deviation is more than predetermined threshold value;
Video image uploading module 25, it is described current for when the relative deviation is more than the predetermined threshold value, judging
Video image is the motion video image, uploads the current video image;
Video image not uploading module 26, for when the relative deviation is not more than the predetermined threshold value, described in judgement
Current video image is non-athletic video image, does not upload the current video image;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video figure
Departure degree of the gray average of picture for the gray average of previous video image;I indicates the serial number of pixel, i value ranges
It is 1 to N, N is the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;It indicates
The sum of the gray value of the current video image,Indicate the gray average of the current video image;Pi[c-
1] gray value of pixel i in previous video image is indicated;Indicate previous video image gray value it
With,Indicate the gray average of previous video image.
As a kind of realization method of the present embodiment, the video image uploading module specifically includes:
Setting unit, for when the relative deviation is more than the predetermined threshold value, identifying that the current video image is
The motion video image, the value that setting uploads flag bit are 1;
Video image compression unit compresses the current video image, life for using Huffman Compress Algorithm
At video image compression packet;
Video image uploading unit will for connecting the distributed memory system based on distributed hashtable DHT overlay networks
The video image compression, which is wrapped, reaches preset memory node;
Wherein, the distributed memory system of the connection based on distributed hashtable DHT overlay networks, by the video image
Compressed package is uploaded to preset memory node, specially:
The distributed memory system based on distributed hashtable DHT overlay networks is connected, using the communication pattern of setting, by institute
It states video image compression and wraps and reach preset memory node;
Wherein, the communication pattern of the setting include in WIFI communication patterns, 4G communication patterns, 5G communication patterns at least
It is a kind of.
As a kind of realization method of the present embodiment, the video image not uploading module is specifically used for:
When the relative deviation is not more than the predetermined threshold value, judge the current video image for non-athletic video figure
Picture, the value that setting uploads flag bit is 0, does not upload the current video image.
In embodiments of the present invention, the moving image of monitor video is only uploaded, is not necessarily to all video figures of monitor video
As all uploading, therefore, the code stream of monitor video can be substantially reduced, a large amount of code stream is avoided to waste, and then reduce video image
The bandwidth of upload so that video image can upload in time, therefore, make full use of the uploading bandwidth needed for video image, can improve
The utilization rate of video image uploading bandwidth.
Embodiment three
Fig. 3 is the schematic diagram that video image provided in an embodiment of the present invention uploads device.As shown in figure 3, the embodiment
Video image uploads device 3:It processor 30, memory 31 and is stored in the memory 31 and can be in the processing
The computer program 32 run on device 30, such as video image upload program.The processor 30 executes the computer program
The step in above-mentioned each video image method for uploading embodiment is realized when 32.
Illustratively, the computer program 32 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 31, and are executed by the processor 30, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 32 in the video image uploads device 3 is described.
It can be desktop PC, notebook, palm PC and cloud server etc. that the video image, which uploads device 3,
Computing device.The video image uploads device and may include, but is not limited only to, processor 30, memory 31.
It will be understood by those skilled in the art that Fig. 3 is only the example that video image uploads device 3, do not constitute to regarding
Frequency image uploads the restriction of device 3, may include either combining certain components or not than illustrating more or fewer components
Same component, such as it can also include input-output equipment, network access equipment, bus etc. that the video image, which uploads device,.
Alleged processor 30 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng.
The memory 31 can be the internal storage unit that the video image uploads device 3, such as on video image
Pass the hard disk or memory of device 3.The memory 31 can also be the External memory equipment that the video image uploads device 3,
Such as the plug-in type hard disk being equipped on the video image upload device 3, intelligent memory card (Smart Media Card, SMC),
Secure digital (Secure Digital, SD) blocks, flash card (Flash Card) etc..Further, the memory 31 may be used also
Both to include that the video image uploads the internal storage unit of device 3 or including External memory equipment.The memory 31 is used
Other programs and data needed for device are uploaded in the storage computer program and the video image.The memory 31
It can be also used for temporarily storing the data that has exported or will export.Those skilled in the art can be clearly
It solves, for convenience of description and succinctly, only with the division progress of above-mentioned each functional unit, module for example, practical application
In, it can be completed as needed and by above-mentioned function distribution by different functional units, module, i.e., by the internal junction of described device
Structure is divided into different functional units or module, to complete all or part of the functions described above.Each work(in embodiment
Can unit, module can be integrated in a processing unit, can also be that each unit physically exists alone, can also two or
During more than two units are integrated in one unit, the form that hardware had both may be used in above-mentioned integrated unit is realized, can also be adopted
It is realized with the form of SFU software functional unit.In addition, the specific name of each functional unit, module is also only to facilitate mutual area
Point, the protection domain being not intended to limit this application.The specific work process of unit in above system, module, before can referring to
The corresponding process in embodiment of the method is stated, details are not described herein.
A kind of computer storage media is provided in another embodiment of the invention, and the computer storage media is stored with
Computer program, the computer program are realized when being executed by processor in above-mentioned each video image method for uploading embodiment
Step.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
In embodiment provided by the present invention, it should be understood that disclosed device and method can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the module or unit,
Only a kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can be with
In conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed
Mutual coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or unit or
Communication connection can be electrical, machinery or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can be stored in a computer read/write memory medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer storage media, and the computer program is when being executed by processor, it can be achieved that above-mentioned each
The step of a embodiment of the method..Wherein, the computer program includes computer program code, the computer program code
Can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium can
To include:Can carry the computer program code any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic disc,
CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random
Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that the computer
The content that readable medium includes can carry out increase and decrease appropriate according to legislation in jurisdiction and the requirement of patent practice, such as
In certain jurisdictions, according to legislation and patent practice, computer-readable medium is including being electric carrier signal and telecommunications letter
Number.
Described device can be the computing devices such as desktop PC, notebook, palm PC and cloud server.It is described
Device may include, but be not limited only to, processor, memory.It will be understood by those skilled in the art that the schematic diagram is only to fill
The example set, the not restriction of structure twin installation may include than illustrating more or fewer components, or the certain portions of combination
Part or different components, such as described device can also include input-output equipment, network access equipment, bus etc..
Alleged processor can be central processing unit (Central Processing Unit, CPU), can also be it
His general processor, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng the processor is the control centre of described device, utilizes the various pieces of various interfaces and connection whole device.
The memory can be used for storing the computer program and/or module, and the processor is by running or executing
Computer program in the memory and/or module are stored, and calls the data being stored in memory, described in realization
The various functions of device.The memory can include mainly storing program area and storage data field, wherein storing program area can deposit
Store up the application program (such as sound-playing function, video image playing function etc.) etc. needed for operating system, at least one function;
Storage data field can be stored uses created data (such as audio data, phone directory etc.) etc. according to mobile phone.In addition, storage
Device may include high-speed random access memory, can also be hard including nonvolatile memory, such as hard disk, memory, plug-in type
Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card
(Flash Card), at least one disk memory, flush memory device or other volatile solid-state parts.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality
Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each
Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed
Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of video image method for uploading, which is characterized in that including:
Obtain the current video image of monitor video and previous video image;
Gray processing processing is carried out to the current video image and the previous video image, after the completion of waiting for gray processing processing, is obtained
The gray value of pixel in the current video image is taken, the gray value of pixel in the previous video image is obtained;
Deviate model according to preset gray average, the gray value of pixel and described previous regard in the current video image
The gray value of pixel in frequency image, generates the relative deviation of the gray average of the current video image;
Judge whether the relative deviation is more than predetermined threshold value;
When the relative deviation is more than the predetermined threshold value, the current video image is judged for the motion video image,
Upload the current video image;
When the relative deviation is not more than the predetermined threshold value, the current video image is judged for non-athletic video image,
The current video image is not uploaded;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video image
Departure degree of the gray average for the gray average of previous video image;I indicate pixel serial number, i value ranges be 1 to
N, N are the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;Described in expression
The sum of gray value of current video image,Indicate the gray average of the current video image;Pi[c-1] table
Show the gray value of pixel i in previous video image;Indicate the sum of the gray value of previous video image,Indicate the gray average of previous video image.
2. the method as described in claim 1, which is characterized in that it is described when the relative deviation is more than the predetermined threshold value,
Judge that the current video image for the motion video image, uploads the current video image, specially:
When the relative deviation is more than the predetermined threshold value, identify that the current video image is the motion video image,
The value that upload flag bit is arranged is 1;
Using Huffman Compress Algorithm, the current video image is compressed, generates video image compression packet;
The distributed memory system based on distributed hashtable DHT overlay networks is connected, the video image compression is wrapped and is reached
Preset memory node.
3. method as claimed in claim 2, which is characterized in that point of the connection based on distributed hashtable DHT overlay networks
The video image compression is wrapped and reaches preset memory node, specially by cloth storage system:
The distributed memory system based on distributed hashtable DHT overlay networks is connected, using the communication pattern of setting, is regarded by described in
Frequency compression of images, which is wrapped, reaches preset memory node.
4. method as claimed in claim 3, which is characterized in that the communication pattern of the setting includes WIFI communication patterns, 4G
At least one of communication pattern, 5G communication patterns.
5. the method as described in claim 1, which is characterized in that described when the relative deviation is not more than the predetermined threshold value
When, judge that the current video image for non-athletic video image, does not upload the current video image, including:
When the relative deviation is not more than the predetermined threshold value, the current video image is judged for non-athletic video image,
The value that upload flag bit is arranged is 0, does not upload the current video image.
6. a kind of video image uploads device, which is characterized in that including:
Video image acquisition module, the current video image for obtaining monitor video and previous video image;
Gray value acquisition module is waited for for carrying out gray processing processing to the current video image and the previous video image
After the completion of gray processing processing, the gray value of pixel in the current video image is obtained, is obtained in the previous video image
The gray value of pixel;
Relative deviation generation module, for deviateing pixel in model, the current video image according to preset gray average
Gray value and the previous video image in pixel gray value, generate the gray average of the current video image
Relative deviation;
Judgment module, for judging whether the relative deviation is more than predetermined threshold value;
Video image uploading module, for when the relative deviation is more than the predetermined threshold value, judging the current video figure
As being the motion video image, the current video image is uploaded;
Video image not uploading module, for working as forward sight described in when the relative deviation is not more than the predetermined threshold value, judging
Frequency image is non-athletic video image, does not upload the current video image;
Wherein, the gray average deviation model is:
Wherein, R indicates the relative deviation of the gray average of the current video image, for describing the current video image
Departure degree of the gray average for the gray average of previous video image;I indicate pixel serial number, i value ranges be 1 to
N, N are the total number of pixel;Pi[c] indicates the gray value of pixel i in current video image;Described in expression
The sum of gray value of current video image,Indicate the gray average of the current video image;Pi[c-1] table
Show the gray value of pixel i in previous video image;Indicate the sum of the gray value of previous video image,Indicate the gray average of previous video image.
7. device as claimed in claim 6, which is characterized in that the video image uploading module specifically includes:
Setting unit, for when the relative deviation is more than the predetermined threshold value, identifying that the current video image is described
Motion video image, the value that setting uploads flag bit are 1;
Video image compression unit compresses the current video image, generation regards for using Huffman Compress Algorithm
Frequency compression of images packet;
Video image uploading unit will be described for connecting the distributed memory system based on distributed hashtable DHT overlay networks
Video image compression, which is wrapped, reaches preset memory node;
Wherein, the distributed memory system of the connection based on distributed hashtable DHT overlay networks, by the video image compression
It wraps and reaches preset memory node, specially:
The distributed memory system based on distributed hashtable DHT overlay networks is connected, using the communication pattern of setting, is regarded by described in
Frequency compression of images, which is wrapped, reaches preset memory node;
Wherein, the communication pattern of the setting includes at least one in WIFI communication patterns, 4G communication patterns, 5G communication patterns
Kind.
8. device as claimed in claim 6, which is characterized in that the video image not uploading module is specifically used for:
When the relative deviation is not more than the predetermined threshold value, the current video image is judged for non-athletic video image,
The value that upload flag bit is arranged is 0, does not upload the current video image.
9. a kind of video image uploads device, including memory, processor and it is stored in the memory and can be described
The computer program run on processor, which is characterized in that the processor realizes such as right when executing the computer program
It is required that the step of any one of 1 to 5 the method.
10. a kind of computer storage media, the computer storage media is stored with computer program, which is characterized in that described
It is realized when computer program is executed by processor such as the step of any one of claim 1 to 5 the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810374233.6A CN108391097A (en) | 2018-04-24 | 2018-04-24 | A kind of video image method for uploading, device and computer storage media |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810374233.6A CN108391097A (en) | 2018-04-24 | 2018-04-24 | A kind of video image method for uploading, device and computer storage media |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108391097A true CN108391097A (en) | 2018-08-10 |
Family
ID=63065473
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810374233.6A Pending CN108391097A (en) | 2018-04-24 | 2018-04-24 | A kind of video image method for uploading, device and computer storage media |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108391097A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109743759A (en) * | 2019-03-01 | 2019-05-10 | 蒋梅 | Mobile communication bandwidth dynamic adjusting device |
CN110198475A (en) * | 2018-11-09 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Method for processing video frequency, device, equipment and computer readable storage medium |
CN110944362A (en) * | 2019-03-01 | 2020-03-31 | 蒋梅 | Dynamic adjusting method for mobile communication bandwidth |
CN113347385A (en) * | 2020-03-02 | 2021-09-03 | 浙江宇视科技有限公司 | Video stream transmission method, device, equipment and medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1688157A (en) * | 2005-06-13 | 2005-10-26 | 北京中星微电子有限公司 | Sports detecting method |
CN101163245A (en) * | 2007-11-27 | 2008-04-16 | 北京中星微电子有限公司 | Image processing method and device |
CN104125487A (en) * | 2013-04-28 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Method and device for uploading image data |
CN104820818A (en) * | 2014-12-26 | 2015-08-05 | 广东中科遥感技术有限公司 | Fast recognition method for moving object |
US20170013175A1 (en) * | 2014-02-26 | 2017-01-12 | Panasonic Intellectual Property Management Co., Ltd. | Image processing apparatus and image processing method |
CN107197201A (en) * | 2017-05-22 | 2017-09-22 | 成都亿盟恒信科技有限公司 | A kind of Vehicular video based on video content analysis uploads control method |
CN107464219A (en) * | 2016-06-03 | 2017-12-12 | 上海联影医疗科技有限公司 | The motion detection and noise-reduction method of consecutive image |
-
2018
- 2018-04-24 CN CN201810374233.6A patent/CN108391097A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1688157A (en) * | 2005-06-13 | 2005-10-26 | 北京中星微电子有限公司 | Sports detecting method |
CN101163245A (en) * | 2007-11-27 | 2008-04-16 | 北京中星微电子有限公司 | Image processing method and device |
CN104125487A (en) * | 2013-04-28 | 2014-10-29 | 腾讯科技(深圳)有限公司 | Method and device for uploading image data |
US20170013175A1 (en) * | 2014-02-26 | 2017-01-12 | Panasonic Intellectual Property Management Co., Ltd. | Image processing apparatus and image processing method |
CN104820818A (en) * | 2014-12-26 | 2015-08-05 | 广东中科遥感技术有限公司 | Fast recognition method for moving object |
CN107464219A (en) * | 2016-06-03 | 2017-12-12 | 上海联影医疗科技有限公司 | The motion detection and noise-reduction method of consecutive image |
CN107197201A (en) * | 2017-05-22 | 2017-09-22 | 成都亿盟恒信科技有限公司 | A kind of Vehicular video based on video content analysis uploads control method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110198475A (en) * | 2018-11-09 | 2019-09-03 | 腾讯科技(深圳)有限公司 | Method for processing video frequency, device, equipment and computer readable storage medium |
CN109743759A (en) * | 2019-03-01 | 2019-05-10 | 蒋梅 | Mobile communication bandwidth dynamic adjusting device |
CN110944362A (en) * | 2019-03-01 | 2020-03-31 | 蒋梅 | Dynamic adjusting method for mobile communication bandwidth |
CN110944362B (en) * | 2019-03-01 | 2020-12-22 | 浙江欧托电气有限公司 | Dynamic adjusting method for mobile communication bandwidth |
CN113347385A (en) * | 2020-03-02 | 2021-09-03 | 浙江宇视科技有限公司 | Video stream transmission method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108391097A (en) | A kind of video image method for uploading, device and computer storage media | |
CN112269527B (en) | Application interface generation method and related device | |
CN109376645B (en) | Face image data optimization method and device and terminal equipment | |
CN109636278A (en) | Material replenishing method, material goods compensator and terminal device | |
CN109086742A (en) | scene recognition method, scene recognition device and mobile terminal | |
CN112990583B (en) | Method and equipment for determining model entering characteristics of data prediction model | |
CN109359260B (en) | Network page change monitoring method, device, equipment and medium | |
CN112182004B (en) | Method, device, computer equipment and storage medium for checking data in real time | |
CN108984339A (en) | Data reconstruction method and Related product | |
CN115408696A (en) | Application identification method and electronic equipment | |
CN107977418A (en) | A kind of screenshot picture management method, screenshot picture managing device and mobile terminal | |
CN108235019A (en) | A kind of storage method and device for compressing image | |
CN110222478A (en) | A kind of method and mobile terminal for protecting document | |
CN109873980A (en) | Video monitoring method, device and terminal device | |
CN107436836A (en) | The processing method and relevant device of a kind of journal file | |
CN106933702A (en) | A kind of method of intelligent terminal storage space management, device and intelligent terminal | |
CN106815062A (en) | A kind of business pipelined data processing method and processing device | |
CN115222500A (en) | Capital monitoring method, device, storage medium and computer equipment | |
CN108520063A (en) | Processing method, device and the terminal device of event log | |
CN108334289A (en) | Driving recording information storage means, device and storage medium based on Internet of Things | |
CN106201247A (en) | Picture loading method in a kind of photograph album and system | |
CN110007878B (en) | Memory card processing method, memory card processing device and mobile terminal | |
CN110297535B (en) | Mobile terminal power supply method, mobile terminal power supply device and mobile terminal | |
CN108182656A (en) | A kind of image processing method and terminal | |
CN111966642B (en) | Picture management method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180810 |