Picture transmission method and system
Technical field
The present invention relates to technical field of image processing, in particular to picture transmission method and system.
Background technology
The intelligent terminals such as mobile phone, ipad have GPS location, the functions such as upload, track record of taking pictures, and are greatly enriched me
Life, while bringing facility to many industries, for example, land/waterborne on duty, forestry is patrolled.Generally, when it is land/
Security personnel waterborne patrols personnel and carries out when patrolling work, it is necessary to the language that will be collected in time in development law-enforcing work, or forestry
The law enforcement record such as sound, video or picture is transmitted to Surveillance center.If for example, patrolling personnel during patrolling on certain ground
The abnormal conditions such as point discovery is poached, felling, should take pictures or recorded video in time, and upload after enclosing corresponding explanatory note
To system specified platform.
However, such industry is more complicated to the application scenarios of intelligent terminal, such as mountain forest, waterborne or elevator are medium, these
The usual network signal of environment is unstable, it is difficult to ensure the ageing of law enforcement record.When transmission of large capacity picture, this phenomenon is outstanding
It is protrusion, because it is higher to transmission network requirement, usually occurs to be transmitted or transmission terminal because transmitted data amount is excessive
Deng the situation of transmission abnormality.
The content of the invention
The present invention is based on above mentioned problem, it is proposed that picture transmission method and system, it is possible to prevente effectively from because of network rings
Border is bad to make the situation of transmission abnormality.
In view of this, an aspect of of the present present invention proposes a kind of picture transmission method, including:
Photographing operation based on user generates a high definition picture, and detects whether current network is stablized;
When the current network is unstable, compresses the high definition picture and generate a compressed picture, and send the compression figure
Piece is to server;
Detect whether to receive the confirmation signal of the server feedback in Preset Time, when testing result for it is no when,
Perform previous step.
Further, the picture transmission method also includes:
When current network stabilization, the picture based on user sends operation and sends the high definition picture to the service
Device.
Further, described " compress the high definition picture and generate a compressed picture " includes:
To the high definition picture reduce the treatment of resolution ratio, the data volume of the high definition picture after acquisition treatment;
Whether compare the data volume less than the data-quantity threshold for storing;
When comparative result is to be, the compressed picture is generated based on the high definition picture after treatment.
Further, described " compress the high definition picture and generate a compressed picture " includes:
To the high definition picture cut the treatment of size, the data volume of the high definition picture after acquisition treatment;
Whether compare the data volume less than the data-quantity threshold for storing;
When comparative result is to be, the compressed picture is generated based on the high definition picture after treatment.
Further, described " whether relatively more described data volume is less than the data-quantity threshold for storing " includes:
Detect the signal intensity of current network, and interval and data-quantity threshold the corresponding relation of the signal intensity based on storage
Obtain data-quantity threshold corresponding with the intensity of the current network;
Whether compare the data volume less than data-quantity threshold corresponding with the intensity of the current network.
Another invention of the invention provides a kind of image transmission system, including:
Whether network detection module, generates a high definition picture, and detect current network for the photographing operation based on user
Stabilization;
Picture compression module, a compressed picture is generated for when the current network is unstable, compressing the high definition picture,
And send the compressed picture to server;
Transmission detection module, the confirmation signal for detecting whether to receive the server feedback in Preset Time,
When testing result is no, previous step is performed.
Further, the image transmission system also includes:
Picture transfer module, for when the current network is stable, the picture based on user to send operation and sends described
High definition picture is to the server.
Further, the picture compression module includes:
Picture processing unit, the treatment for the high definition picture reduce resolution ratio, the high definition after acquisition treatment
The data volume of picture;
Comparing unit, for whether comparing the data volume less than the data-quantity threshold for storing;
Generation unit, for when comparative result is to be, the compressed picture being generated based on the high definition picture after treatment.
Further, the picture compression module includes:
Picture processing unit, the treatment for the high definition picture cut size, the high definition picture after acquisition treatment
Data volume;
Comparing unit, for whether comparing the data volume less than the data-quantity threshold for storing;
Generation unit, for when comparative result is to be, the compressed picture being generated based on the high definition picture after treatment.
Further, the comparing unit is additionally operable to detect the signal intensity of current network, and strong based on the signal for storing
Interval and data-quantity threshold the corresponding relation of degree obtains data-quantity threshold corresponding with the intensity of the current network, and compares institute
Whether data volume is stated less than data-quantity threshold corresponding with the intensity of the current network.
Picture transmission method and system that the present invention is provided, in the case where current network is unstable, first will be to transmission network
Road bandwidth requirement is transmitted to server than relatively low compressed picture so that server can be to figure according to the compressed picture for receiving
Piece information has a certain degree of understanding, greatly improves picture transfer efficiency, it is ensured that information transfer it is ageing.
To enable the above objects, features and advantages of the present invention to become apparent, preferred embodiment cited below particularly, and coordinate
Appended accompanying drawing, is described in detail below.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be attached to what is used needed for embodiment
Figure is briefly described, it will be appreciated that the following drawings illustrate only certain embodiments of the present invention, thus be not construed as it is right
The restriction of scope, for those of ordinary skill in the art, on the premise of not paying creative work, can also be according to this
A little accompanying drawings obtain other related accompanying drawings.
Fig. 1 shows the schematic flow sheet of picture transmission method provided in an embodiment of the present invention;
Fig. 2 shows the structural representation of image transmission system provided in an embodiment of the present invention.
Main element symbol description:
100- image transmission systems;10- network detection modules;20- picture compression modules;30- transmits detection module.
Specific embodiment
For the ease of understanding the present invention, picture transmission method and system are become apparent from below with reference to relevant drawings,
It is fully described by.The preferred embodiment of picture transmission method and system is given in accompanying drawing.Picture transmission method and system can be with
Realized by many different forms, however it is not limited to embodiment described herein.Therefore, below in the accompanying drawings providing
The detailed description of embodiments of the invention is not intended to limit the scope of claimed invention, but is merely representative of the present invention
Selected embodiment.Based on embodiments of the invention, those skilled in the art institute on the premise of creative work is not made
The every other embodiment for obtaining, belongs to the scope of protection of the invention.
Embodiment 1
Fig. 1 shows the schematic flow sheet of picture transmission method provided in an embodiment of the present invention.
As shown in figure 1, picture transmission method provided in an embodiment of the present invention, is applied to long-range with picture shooting and picture
The digital camera of the intelligent terminal of transfer function, such as mobile phone, energy of being passed on Gong with figure, including:
Step S1, the photographing operation based on user generates a high definition picture, and detects whether current network is stablized.
Specifically, when user is taken pictures using intelligent terminals such as mobile phones, the pictorial information that user shoots, and root are obtained
A high definition picture is generated according to the pictorial information.It is appreciated that the pixel resolution of the high definition picture depends on concrete intelligence
The number of pixels of camera in terminal.Additionally, the pixel depth of the high definition picture depends on the color of display in intelligent terminal
Colour display screen shows system number, because the color displays system number of display determines the number of the color that the intelligent terminal can be represented.
For example, the colour of color monitor is synthesized into by three primary colours, it is assumed that the three primary colours R of certain color monitor is red, G is green
Color and B bluenesss represent that then the color monitor can represent 4096 kinds of different colors with 4 bits respectively.
Further, the pixel resolution and pixel depth of a high definition picture determine the data volume of the high definition picture, example
As one is secondary with very color (24), pixel resolution is the high definition picture of 1024*768, is not carrying out any digital compression etc.
Before processing, its data volume is about 2.25MB.Certainly, the data volume of high definition picture is also related to its size.Generally by intelligence
The data volume of the high definition picture that terminal is obtained is than larger.
Further, after user completes picture shooting, the change in signal strength frequency of current network is detected.The signal
Strength Changes frequency refers to that within the unit interval, current network is from the number of times that a change in signal strength is another signal intensity.Than
Compared with the change in signal strength frequency and the change frequency threshold value of storage of current network, so as to judge whether current network is stablized.Hold
It is readily understood, when the change in signal strength frequency of the current network reaches the change frequency threshold value, represent current network not
Stabilization;Conversely, representing current network stabilization.
Step S2, when the current network is unstable, compresses the high definition picture and generates a compressed picture, and send described
Compressed picture is to server.
If current network is unstable, compresses the high definition picture and generate a compressed picture.The data volume phase of the compressed picture
Data volume than high definition picture is generally smaller, and in the present embodiment, the data volume of compressed picture is usual in below 150Kb, so that
The transmission of compressed picture is to network bandwidth requirement than relatively low.
Specifically, the signal intensity of current network is detected.Signal intensity according to storage is interval and data-quantity threshold right
Should be related to, judge which signal intensity interval is the signal intensity of current network belong to, and obtain the intensity with the current network
Corresponding data-quantity threshold.The setting of data-quantity threshold is easy to make high definition picture different degrees of compression treatment, it is readily appreciated that,
Network signal intensity is lower, and corresponding data-quantity threshold is also smaller, so as to the compression degree to high definition picture is bigger.Certainly, when
Intelligent terminal transmit picture to carry out data transmission between server, or intelligent terminal when, can rule of thumb set and be best suitable for
The data-quantity threshold that picture is quickly transmitted.
Further, in the present embodiment, the compression to high definition picture includes two kinds of implementation methods.A kind of implementation method is drop
The resolution ratio of the low high definition picture, for example, colored high definition picture is converted to the high definition picture of black and white, so as to lower high definition
The data volume of picture.Specifically, the data volume data-quantity threshold corresponding with the signal intensity of current network of high definition picture is calculated
Difference, it is then disposable to complete the reduction of resolution ratio it is determined that the resolution sizes of required attenuating, or complete resolution ratio several times
Reduction, every time reduce designated value resolution ratio, until the data volume of the high definition picture be less than corresponding data-quantity threshold.
Another embodiment is that the high definition picture is cut, to reduce the size of the high definition picture, for example, cutting out
The frame or background of high definition picture are cut, so as to lower the data volume of high definition picture.It should be noted that the cutting to high definition picture
Should be premised on not changing the particular content of high definition picture.Certainly, the cutting to high definition picture can also be using existing to figure
The cutting of piece, in the way of the data volume for reducing picture, is not limited here.
Further, the data volume of the high definition picture after compression treatment is obtained, and compares the number of the high definition picture after treatment
Whether data-quantity threshold corresponding with the intensity of the current network is less than according to amount.When comparative result is no, after treatment
High definition picture makees further compression treatment, so repeatedly, until the data volume of the high definition picture after treatment is current less than with described
The corresponding data-quantity threshold of intensity of network.The data volume of high definition picture after treatment is less than the intensity with the current network
During corresponding data-quantity threshold, the compressed picture is generated based on the high definition picture after treatment.
In another embodiment, user can be said with attached certain text message according to the high definition picture for shooting for remarks
It is bright.Personnel are for example patrolled to find when there is poaching situation, can be with remarks poaching geographic area, poaching personal information, poaching object
Deng text information, it is easy to Surveillance center to understand abnormal conditions in time and provides treatment measures.In the present embodiment, the Surveillance center
It is arranged on server end.Generally, the data volume of text information is smaller, can be with compressed picture asynchronous transmission to server, this
In embodiment, after the transmission for completing text information, compressed picture to the server is sent.
Step S3, detects whether to receive the confirmation signal of the server feedback in Preset Time, works as testing result
For it is no when, perform step S2.
In the present embodiment, after compressed picture to server is sent, to whether sending and being successfully monitored.Specifically, exist
Detect whether to receive the confirmation signal of the server feedback in Preset Time, so as to judge whether server is properly received pressure
The data message of contract drawing piece.It is appreciated that when the confirmation signal of the server feedback is received in Preset Time, representing
The data message of compressed picture is successfully transmitted to server;Otherwise, it is necessary to resend, that is, step S2 is performed, until successfully sending out
Send the data message of compressed picture to server.
Step S4, when current network stabilization, the picture based on user sends operation and sends the high definition picture extremely
The server.
It should be noted that user need not carry out any upload operation in intelligent terminal, compressed picture is automatic after generation
Transmit to server, and whole compressed picture transmitting procedure in intelligent terminal operation system running background, user is simultaneously unaware of.
When generally current network is unstable, user can only be moved to the more stable network environment for being adapted to high definition picture transfer
High definition picture is sent behind position, it is clear that this mode, data transmission efficiency is low.The present embodiment is being worked as to the transmission means of picture
In the case of preceding unstable networks, transmission network bandwidth requirement will be first transmitted to server than relatively low compressed picture so that
Server can have a certain degree of understanding according to the compressed picture for receiving to pictorial information, greatly improve picture transfer effect
Rate, it is ensured that information transfer it is ageing.
It is appreciated that the information content that server can be known according to the compressed picture for receiving is not as good as high definition picture.This reality
Apply in example, whether the transmission to high definition picture depends on user.Specifically, during current network stabilization, user can supplement transmission
High definition picture is to server.Picture based on user sends operation and sends the high definition picture to the server.Easily find,
The present embodiment can realize that as many as user once-through operation completes the transmission of picture, reduce user's operation, and Consumer's Experience is relatively good.
Embodiment 2
Fig. 2 shows the structural representation of image transmission system provided in an embodiment of the present invention.
As shown in Fig. 2 image transmission system provided in an embodiment of the present invention 100, including network detection module 10, picture pressure
Contracting module 20 and transmission detection module 30.
Whether network detection module 10 is used for the photographing operation based on user and generates a high definition picture, and detects current network
Stabilization.
Picture compression module 20 is used to, when the current network is unstable, compress the high definition picture and generate a compression figure
Piece, and send the compressed picture to server.In the present embodiment, picture compression module 20 includes picture processing unit, compares
Unit and generation unit.
Picture processing unit, the treatment for the high definition picture reduce resolution ratio, the high definition after acquisition treatment
The data volume of picture.
In another embodiment, picture processing unit is additionally operable to that the high definition picture cut the treatment of size, at acquisition
The data volume of the high definition picture after reason.
Comparing unit, for whether comparing the data volume less than the data-quantity threshold for storing.
Specifically, the comparing unit detects the signal intensity of current network, and the signal intensity based on storage it is interval and
The corresponding relation of data-quantity threshold obtains data-quantity threshold corresponding with the intensity of the current network, and relatively more described data volume
Whether data-quantity threshold corresponding with the intensity of the current network is less than.
Generation unit, for when comparative result is to be, the compressed picture being generated based on the high definition picture after treatment.
Transmission detection module 30 is used to detect whether to receive the confirmation signal of the server feedback in Preset Time,
When testing result is no, the compressed picture to server is resend.
In another embodiment, the image transmission system 100 also includes picture transfer module 40.
Picture transfer module 40 is used for when current network stabilization, and the picture based on user sends operation and sends described
High definition picture is to the server.
Picture transmission method and system that the present invention is provided, in the case where current network is unstable, first will be to transmission network
Road bandwidth requirement is transmitted to server than relatively low compressed picture so that server can be to figure according to the compressed picture for receiving
Piece information has a certain degree of understanding, greatly improves picture transfer efficiency, it is ensured that information transfer it is ageing.
The technique effect and preceding method embodiment phase of the system that the embodiment of the present invention is provided, its realization principle and generation
Together, to briefly describe, system embodiment part does not refer to part, refers to corresponding contents in preceding method embodiment.
In all examples being illustrated and described herein, any occurrence should be construed as merely exemplary, without
It is limitation to be, therefore, other examples of exemplary embodiment can have different values.It should be noted that:Similar label and word
Mother represents similar terms in following accompanying drawing, therefore, once be defined in a certain Xiang Yi accompanying drawing, then in subsequent accompanying drawing
It need not further be defined and is explained.
In several embodiments provided herein, it should be understood that disclosed device can be by other sides
Formula is realized.Device embodiment described above is only schematical, for example, the division of the unit, only one kind are patrolled
Collect function to divide, there can be other dividing mode when actually realizing, but for example, multiple units or component can combine or can
To be integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed each other
Coupling or direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of device or unit by some communication interfaces
Connect, can be electrical, mechanical or other forms.
The unit for separating component explanation can be or may not be physically separate, be what unit showed
Part can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple networks
On unit.Some or all of unit therein can be according to the actual needs selected to realize the purpose of this embodiment scheme.
In addition, during each functional unit in each embodiment of the invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.
The above, specific embodiment only of the invention, but protection scope of the present invention is not limited thereto, and it is any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all contain
Cover within protection scope of the present invention.Therefore, protection scope of the present invention described should be defined by scope of the claims.