CN109788160A - Image transfer method, device, electronic equipment and storage medium - Google Patents
Image transfer method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN109788160A CN109788160A CN201811527698.7A CN201811527698A CN109788160A CN 109788160 A CN109788160 A CN 109788160A CN 201811527698 A CN201811527698 A CN 201811527698A CN 109788160 A CN109788160 A CN 109788160A
- Authority
- CN
- China
- Prior art keywords
- image
- present
- history
- encryption data
- compressed
- 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
Landscapes
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention relates to image transfer method, device, electronic equipment and computer readable storage mediums.The described method includes: obtaining image;Compression processing is carried out to the image of acquisition;Compressed image is encrypted;And the image through overcompression is transmitted in target device by low-bandwidth network.The present invention is by the image progress compression processing to acquisition, and compressed image is encrypted, and can reduce the data volume of image transmitting, and save network bandwidth.
Description
Technical field
The present invention relates to field of computer technology, and in particular to a kind of image transfer method, device, electronic equipment and storage
Medium.
Background technique
Conventional images data are based on RTSP stream mode and transmit, wherein and image resolution ratio is higher, and image data amount is bigger,
It is also higher that image data occupies network bandwidth.Image data is thus transmitted in low-bandwidth network is easy to appear frame losing phenomenon.
Summary of the invention
In view of the foregoing, it is necessary to propose a kind of image transfer method, device, electronic equipment and computer-readable storage
Medium saves network bandwidth to reduce the data volume of image transmitting.
The first aspect of the application provides a kind of image transfer method, which comprises
Obtain image;
Compression processing is carried out to the image of acquisition;
Compressed image is encrypted;And
Image after overcompression and encryption is transmitted in target device by low-bandwidth network.
Preferably, carrying out compression processing to the image of acquisition includes:
The image currently obtained is compared with the image that one or more history obtain, according to comparison result by multiple
A reduced rule is selected to compress the image currently obtained in reduced rule.
Preferably, it is described according to comparison result by multiple reduced rules select a reduced rule to the current acquisition
Image carry out compression include:
Calculate the consistent block ratio of the previous image of the present image of the present image and acquisition, wherein work as by described in
Preceding image and the previous image are respectively divided into the block of identical size, calculate pair of the present image and the previous image
It answers the similarity of block and similarity is greater than the block of predetermined threshold to be defined as the present image consistent with the previous image
Block, and consistent block ratio is calculated by formula R=n/N, wherein n is the number of consistent block, and N is present image or described previous
The number for the block that image is divided, R are consistent block ratio;
Judge whether the present image and the acquisition time interval of the previous image are less than predetermined first threshold;
Judge whether consistent block ratio is greater than predetermined the when the acquisition time interval is less than the predetermined first threshold
Two threshold values;And
If consistent block ratio selects the first reduced rule to compress present image when being greater than the predetermined second threshold,
Wherein first reduced rule is the first residual image for calculating the present image and the previous image, to described first
Residual image is compressed to obtain the compressing image data of present image.
Preferably, the method also includes:
When the acquisition time interval makes a reservation for the second threshold no more than described not less than predetermined first threshold or consistent block ratio
When value, the consistent block ratio of the image of the present image and one or more history acquisitions is calculated separately;
Consistent block ratio is judged whether there is greater than the image that the history of predetermined third threshold value obtains;And
When the image that the history for being greater than predetermined third threshold value there are consistent block rate value obtains, the second reduced rule is selected
The present image is compressed, second reduced rule is to calculate separately the present image to obtain at least one history
The statistical nature of the image taken, the image for selecting statistical nature and the immediate history of the present image to obtain is as choosing
Determine history image, the second residual image of the selected history image and the present image is calculated, to second residual plot
As being compressed to obtain the compressing image data of the present image.
Preferably, the method also includes:
When the image that the history for being greater than predetermined third threshold value there is no consistent block rate value obtains, third compression rule are selected
Then the present image is compressed, wherein the third reduced rule is the characteristic pattern for calculating the image that multiple history obtain
The present image is expressed as the sum of linear combination and the third residual image of the characteristic image by picture, then to described
Three residual images are compressed to obtain the compressing image data of the present image.
Preferably, described compressed image is encrypted includes:
Compressed image is encrypted with first key, obtains image encryption data;
The beginning flag symbol of described image encryption data is set, to mark as to the decoded starting of described image encryption data
Will;
Cyclic redundancy check is carried out to described image encryption data and encodes to obtain check code, and by described image encryption data
Scrambling encryption is carried out by the second key with the check code;And
The length for obtaining described image encryption data adds after encrypting the length third key of described image encryption data
It is added in described image encryption data, and the termination identifier of encryption data is set in described image encryption data.
Preferably, it is described to described image encryption data carry out cyclic redundancy check encode to obtain check code include:
Described image encryption data is encoded using CRC-16 remainder table method progress cyclic redundancy check and is verified
Code.
The second aspect of the application provides a kind of image transmission, and described device includes:
Module is obtained, for obtaining image;
Compression module, for carrying out compression processing to the image of acquisition;
Encrypting module, for compressed image to be encrypted;And
Sending module, for the image after overcompression and encryption to be transmitted to target device by low-bandwidth network
In.
The third aspect of the application provides a kind of electronic equipment, and the electronic equipment includes processor, and the processor is used
Described image transmission method is realized when executing the computer program stored in memory.
The fourth aspect of the application provides a kind of computer readable storage medium, is stored thereon with computer program, described
Described image transmission method is realized when computer program is executed by processor.
The present invention is by carrying out compression processing to the image of acquisition, and compressed image is encrypted, can be with
The data volume of image transmitting is reduced, and saves network bandwidth.
Detailed description of the invention
Fig. 1 is the flow chart of image transfer method in an embodiment of the present invention.
Fig. 2 is the application environment schematic diagram of image transfer method in an embodiment of the present invention.
Fig. 3 is the structure chart of image transmission in an embodiment of the present invention.
Fig. 4 is the schematic diagram of electronic equipment preferred embodiment in an embodiment of the present invention.
Specific embodiment
To better understand the objects, features and advantages of the present invention, with reference to the accompanying drawing and specific real
Applying example, the present invention will be described in detail.It should be noted that in the absence of conflict, embodiments herein and embodiment
In feature can be combined with each other.
In the following description, numerous specific details are set forth in order to facilitate a full understanding of the present invention, described embodiment is only
It is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill
Personnel's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention
The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool
The purpose of the embodiment of body, it is not intended that in the limitation present invention.
Preferably, image transfer method of the invention is applied in one or more electronic equipment.The electronic equipment
It is that one kind can be according to the instruction for being previously set or storing, the automatic equipment for carrying out numerical value calculating and/or information processing, hardware
Including but not limited to microprocessor, specific integrated circuit (Application Specific Integrated Circuit,
ASIC), programmable gate array (Field-Programmable Gate Array, FPGA), digital processing unit (Digital
Signal Processor, DSP), embedded device etc..
The electronic equipment can be the calculating such as desktop PC, laptop, tablet computer and cloud server
Equipment.The equipment can carry out man-machine friendship by modes such as keyboard, mouse, remote controler, touch tablet or voice-operated devices with user
Mutually.
Embodiment 1
Fig. 1 is the flow chart of image transfer method preferred embodiment in an embodiment of the present invention.According to different requirements,
The sequence of step can change in the flow chart, and certain steps can be omitted.
As shown in fig.1, described image transmission method specifically includes the following steps:
Step S101 obtains image.
Referring to Fig.2, showing the application environment schematic diagram of image transfer method in an embodiment of the present invention.The method
It applies in an image collecting device 1.Described image acquisition device 1 includes an image acquisition units 11, and described image acquisition is single
Member 11 is for acquiring the people of 1 ambient enviroment of image collecting device or the image of object, such as facial image.In an implementation,
Described image acquisition unit 11 can be 2D video camera, and described image identification device 1 obtains image by the 2D video camera.?
In one embodiment, described image acquisition device 1 can obtain image from its internal storage device.In a present embodiment
In, described image acquisition device 1 can also obtain image from the electronic device 2 for communicating with connection.Wherein, the electronics dress
Setting 2 may be, but not limited to, the devices such as server, cluster of servers, computer installation, mobile phone, tablet computer.Described image is adopted
Acquisition means 1 can be communicated to connect with the electronic device 2 by a network 3 and obtain image from the electronic device 2.One
In specific embodiment, the network 3 for supporting image collecting device 1 to be communicated with electronic device 2 can be cable network,
It is also possible to wireless network, such as radio, Wireless Fidelity (Wireless Fidelity, WIFI), honeycomb, satellite, broadcast
Deng.In present embodiment, described image also may include the video being made of a series of pictures frame.
Step S102 carries out compression processing to the image of acquisition.
The image currently obtained is compared with the image that one or more history obtain, according to comparison result by multiple
A reduced rule is selected to compress the image currently obtained in reduced rule.Specifically, the figure that will currently obtain
As the image obtained with one or more history is compared and according to comparison result by selecting a pressure in multiple reduced rules
Contraction ga(u)ge then carries out compression to the image currently obtained
(a) the consistent block ratio of the previous image of the present image of present image and acquisition is calculated.
In present embodiment, the consistent of the previous image of present image and present image can be calculated in the following manner
Block ratio: being respectively divided into N number of piece of identical size for present image and previous image, and N is greater than 1 integer, such as block
Size can be 256 × 256 pixels, and same image is divided into multiple pieces;Calculate the corresponding blocks of present image and previous image
Similarity, the block that similarity is greater than predetermined threshold is defined as the consistent block of present image and previous image;And it will be consistent
Block ratio is defined as n/N, and wherein n is the number of consistent block, and n is greater than the integer equal to 0.For example, predetermined threshold here
It can be set to 2/3, the present invention is not limited thereto, and those skilled in the art can be configured according to the actual situation.This
In invention, similarity can be the difference or other parameters well known in the art of grey level histogram.
(b) judge whether the acquisition time interval of present image and previous image is less than predetermined first threshold.This embodiment party
In formula, step c is executed when acquisition time interval is less than predetermined first threshold, it is no to then follow the steps e.
(c) judge whether consistent block ratio is greater than predetermined second threshold.In present embodiment, if consistent block ratio is greater than in advance
Determine second threshold, thens follow the steps d, it is no to then follow the steps e.
(d) the first reduced rule of selection compresses present image.
In present embodiment, first reduced rule is the first residual image for calculating present image and previous image,
First residual image is compressed to obtain the compressing image data of present image.
(e) the consistent block ratio of the image of the present image and one or more history acquisitions is calculated separately.
(f) consistent block ratio is judged whether there is greater than the image that the history of predetermined third threshold value obtains.It is consistent when existing
Step g is executed when the image that the history that block ratio is greater than predetermined third threshold value obtains, it is no to then follow the steps h.
(g) the second reduced rule of selection compresses present image.
In present embodiment, second reduced rule is the figure for calculating separately present image and the acquisition of at least one history
The statistical nature of picture, the image for selecting statistical nature and the immediate history of present image to obtain is as selected history figure
Picture calculates the second residual image of selected history image and present image, is compressed to the second residual image and currently schemed
The compressing image data of picture.In present embodiment, statistical nature may include average brightness, grey level histogram etc..This field skill
Art personnel can choose other common statistical natures.
(h) selection third reduced rule compresses present image.
In present embodiment, the third reduced rule is the characteristic image for calculating the image that multiple history obtain, and will be worked as
Preceding image is expressed as the sum of linear combination and third residual image of the characteristic image, then presses third residual image
Contracting obtains the compressing image data of present image.In present embodiment, the Result for Combinations coefficient of characteristic image passes through real-time
It is calculated, to guarantee that this combination is a more excellent approximation of present image.In present embodiment, characteristic image is logical
Cross what the principal component analysis of image obtained, linear weighted function coefficient is projection coefficient of the present image to each characteristic image.This implementation
In mode, first threshold be can be set to 3 minutes, and second threshold can be set to 2/3, and third threshold value T3 can be set to 2/3,
The present invention is not limited thereto.
In present embodiment, the image obtained using history realizes the more efficient compression to present image, to reduce
The file data amount of present image reduces the data volume for being transmitted to distal end, improves efficiency of transmission.
Compressed image is encrypted in step S103.
In a specific embodiment, described image acquisition device 1 first carries out compressed image with first key
Encryption, obtains image encryption data.In present embodiment, the format of described image can for BMP, JPEG, JPEG2000, PNG,
RAW, BASE64 etc..Described image acquisition device 1 also sets up the beginning flag symbol of image encryption data, as to image encryption
The decoded beginning flag of data.Wherein, the beginning flag of described image encryption data accords with the character that can be made of multiple bytes
Definition.
Described image acquisition device 1 further carries out cyclic redundancy check to image encryption data and encodes to obtain check code,
And image encryption data and the check code are subjected to scrambling encryption by the second key.In present embodiment, image collector
1 is set after being encrypted to obtain image encryption data to compressed image, cyclic redundancy is carried out to image encryption data
Check code obtains check code.The cyclic redundancy check coding can detect odd number mistake, and can detect that length is less than
Equal to the single burst error of verification bit length, therefore, cyclic redundancy check coding is carried out to the image coding of encryption, it can be effective
Ground prevents the malice to image encryption data from distorting.It, can in order to improve the efficiency of cyclic redundancy check coding in present embodiment
To carry out cyclic redundancy check coding using CRC-16 remainder table methods.In present embodiment, described image acquisition device 1 will
Image encryption data and the check code by the second key carry out scrambling encryption to ensure the safety of image coding and true
Property.
Described image acquisition device 1 is also used to obtain the length of image encryption data, and the length of image encryption data is used
It is added in image encryption data after the encryption of third key, and the termination mark of encryption data is set in image encryption data
Symbol, is so encrypted compressed image.
In present embodiment, image encryption data can be encoded by image image to be shown and the cyclic redundancy check of encryption
Coding composition and the attached cyclic redundancy check coding after image to be displayed coding, since cyclic redundancy check encoding ratio is to be shown
Image data is much smaller, can greatly save the data volume of image transmitting, the authenticity of original image can be superfluous by decryption rounds
Remaining check code is verified.
In present embodiment, image decryption process is exactly the opposite with ciphering process, first verifies that with the presence or absence of image encryption
Data origin identification symbol and termination identifier.If it does not exist, then being uncoded image, such as exist, is then decrypted with third key
Original image code length, and pass through the position of origin identification symbol and termination identifier, and cyclic code and original graph when coding
As whether the length relation verifying original image code length of coding is correct.It is then uncoded image as incorrect, it is such as correct,
The encryption data then encoded with the second key decryption rounds check code and original image, and verify cyclic check code and original image
Whether the relationship of coding encrypting data is correct.It is then uncoded image as incorrect, it is such as correct, then use first key decrypted original
Beginning image.In present embodiment, original image is the image for having been compressed processing.
Image through overcompression and encryption is transmitted in target device by step S104 by low-bandwidth network.
In present embodiment, the target device can be the devices such as server, computer, smart phone.The present invention couple
Image is compressed, after encryption, image can be transmitted in destination apparatus by low-bandwidth network, to realize reduction
The data volume of image transmitting and the purpose for saving network bandwidth.
History image in this case using shooting realizes the more efficient compression to present image, to reduce present image
Data volume, reduce and be transmitted to the data volume of distal end, improve efficiency of transmission.In addition, the figure encrypted to compressed image
As encryption data can be made of and the cyclic redundancy check coding that image image to be shown encodes and encrypts in image to be displayed
Attached cyclic redundancy check encodes after coding, since cyclic redundancy check encoding ratio image to be displayed data are much smaller, Ke Yi great
The big data volume for saving image transmitting.
Embodiment 2
Fig. 3 is the structure chart of image transmission 40 in an embodiment of the present invention.
In some embodiments, described image transmitting device 40 is run in electronic equipment.Described image transmitting device 40
It may include multiple functional modules as composed by program code segments.The journey of each program segment in described image transmitting device 40
Sequence code can store in memory, and as performed by least one processor, to execute the function of image transmitting.
In the present embodiment, function of the image transmission 40 of the electronic equipment according to performed by it can be divided
For multiple functional modules.As shown in fig.3, described image transmitting device 40 may include obtain module 401, compression module 402,
Encrypting module 403 and sending module 404.The so-called module of the present invention refers to that one kind can be performed by least one processor simultaneously
And the series of computation machine program segment of fixed function can be completed, storage is in memory.In some embodiments, about each
The function of module will be described in detail in subsequent embodiment.
The acquisition module 401 obtains image for controlling.
In present embodiment, the module 401 that obtains passes through the 2D video camera acquisition image in image collecting device 1.?
In one embodiment, the acquisition module 401 can obtain image from the storage device inside image collecting device 1.Another
In one embodiment, described image acquisition device 1 can also be obtained from the electronic device 2 communicated to connect with image collecting device 1
Take image.Wherein, the electronic device 2 may be, but not limited to, server, cluster of servers, computer installation, mobile phone, put down
The devices such as plate computer.Described image acquisition device 1 can be communicated to connect with the electronic device 2 by a network 3 and from described
Image is obtained in electronic device 2.In a specific embodiment, for supporting image collecting device 1 to be led to electronic device 2
The network 3 of letter can be cable network, be also possible to wireless network, such as radio, Wireless Fidelity (Wireless
Fidelity, WIFI), honeycomb, satellite, broadcast etc..In present embodiment, described image also may include by a series of pictures frame
The video of composition.
The compression module 402 is used to carry out compression processing to the image of acquisition.
The image currently obtained is compared with the image that one or more history obtain, according to comparison result by multiple
A reduced rule is selected to compress the image currently obtained in reduced rule.Specifically, the compression module 402
For:
(a) the consistent block ratio of the previous image of the present image of present image and acquisition is calculated.
In present embodiment, the consistent of the previous image of present image and present image can be calculated in the following manner
Block ratio: being respectively divided into N number of piece of identical size for present image and previous image, and N is greater than 1 integer, such as block
Size can be 256 × 256 pixels, and same image is divided into multiple pieces;Calculate the corresponding blocks of present image and previous image
Similarity, the block that similarity is greater than predetermined threshold is defined as the consistent block of present image and previous image;And it will be consistent
Block ratio is defined as n/N, and wherein n is the number of consistent block, and n is greater than the integer equal to 0.For example, predetermined threshold here
It can be set to 2/3, the present invention is not limited thereto, and those skilled in the art can be configured according to the actual situation.This
In invention, similarity can be the difference or other parameters well known in the art of grey level histogram.
(b) judge whether the acquisition time interval of present image and previous image is less than predetermined first threshold.This embodiment party
In formula, step c is executed when acquisition time interval is less than predetermined first threshold, it is no to then follow the steps e.
(c) judge whether consistent block ratio is greater than predetermined second threshold.In present embodiment, if consistent block ratio is greater than in advance
Determine second threshold, thens follow the steps d, it is no to then follow the steps e.
(d) the first reduced rule of selection compresses present image.
In present embodiment, first reduced rule is the first residual image for calculating present image and previous image,
First residual image is compressed to obtain the compressing image data of present image.
(e) the consistent block ratio of the image of the present image and one or more history acquisitions is calculated separately.
(f) consistent block ratio is judged whether there is greater than the image that the history of predetermined third threshold value obtains.It is consistent when existing
Step g is executed when the image that the history that block ratio is greater than predetermined third threshold value obtains, it is no to then follow the steps h.
(g) the second reduced rule of selection compresses present image.
In present embodiment, second reduced rule is the figure for calculating separately present image and the acquisition of at least one history
The statistical nature of picture, the image for selecting statistical nature and the immediate history of present image to obtain is as selected history figure
Picture calculates the second residual image of selected history image and present image, is compressed to the second residual image and currently schemed
The compressing image data of picture.In present embodiment, statistical nature may include average brightness, grey level histogram etc..This field skill
Art personnel can choose other common statistical natures.
(h) selection third reduced rule compresses present image.
In present embodiment, the third reduced rule is the characteristic image for calculating the image that multiple history obtain, and will be worked as
Preceding image is expressed as the sum of linear combination and third residual image of the characteristic image, then presses third residual image
Contracting obtains the compressing image data of present image.In present embodiment, the Result for Combinations coefficient of characteristic image passes through real-time
It is calculated, to guarantee that this combination is a more excellent approximation of present image.In present embodiment, characteristic image is logical
Cross what the principal component analysis of image obtained, linear weighted function coefficient is projection coefficient of the present image to each characteristic image.This implementation
In mode, first threshold be can be set to 3 minutes, and second threshold can be set to 2/3, and third threshold value T3 can be set to 2/3,
The present invention is not limited thereto.
In present embodiment, the image that the compression module 402 is obtained using history is realized to the more efficient of present image
Compression reduce the data volume for being transmitted to distal end to reduce the file data amount of present image, improve efficiency of transmission.
The encrypting module 403 is for being encrypted compressed image.
In a specific embodiment, the encrypting module 403 first adds compressed image with first key
It is close, obtain image encryption data.In present embodiment, the format of described image can for BMP, JPEG, JPEG2000, PNG,
RAW, BASE64 etc..The encrypting module 403 also sets up the beginning flag symbol of image encryption data, as to image encryption number
According to decoded beginning flag.Wherein, the beginning flag symbol of described image encryption data can be determined by the character that multiple bytes form
Justice.
The encrypting module 403 further carries out cyclic redundancy check to image encryption data and encodes to obtain check code, and
Image encryption data and the check code are subjected to scrambling encryption by the second key.In present embodiment, the encrypting module
403 to compressed image after being encrypted to obtain image encryption data, carries out cyclic redundancy to image encryption data
Check code obtains check code.The cyclic redundancy check coding can detect odd number mistake, and can detect that length is less than
Equal to the single burst error of verification bit length, therefore, cyclic redundancy check coding is carried out to the image coding of encryption, it can be effective
Ground prevents the malice to image encryption data from distorting.It, can in order to improve the efficiency of cyclic redundancy check coding in present embodiment
To carry out cyclic redundancy check coding using CRC-16 remainder table methods.In present embodiment, the encrypting module 403 will figure
As encryption data and the check code carry out scrambling encryption by the second key to ensure the safety and authenticity of image coding.
The encrypting module 403 is also used to obtain the length of image encryption data, by the length of image encryption data with
It is added in image encryption data after the encryption of three keys, and the termination identifier of encryption data is set in image encryption data,
So compressed image is encrypted.
In present embodiment, image encryption data can be encoded by image image to be shown and the cyclic redundancy check of encryption
Coding composition and the attached cyclic redundancy check coding after image to be displayed coding, since cyclic redundancy check encoding ratio is to be shown
Image data is much smaller, can greatly save the data volume of image transmitting, the authenticity of original image can be superfluous by decryption rounds
Remaining check code is verified.
In present embodiment, image decryption process is exactly the opposite with ciphering process, first verifies that with the presence or absence of image encryption
Data origin identification symbol and termination identifier.If it does not exist, then being uncoded image, such as exist, is then decrypted with third key
Original image code length, and pass through the position of origin identification symbol and termination identifier, and cyclic code and original graph when coding
As whether the length relation verifying original image code length of coding is correct.It is then uncoded image as incorrect, it is such as correct,
The encryption data then encoded with the second key decryption rounds check code and original image, and verify cyclic check code and original image
Whether the relationship of coding encrypting data is correct.It is then uncoded image as incorrect, it is such as correct, then use first key decrypted original
Beginning image.In present embodiment, original image is the image for having been compressed processing.
The sending module 404 is used to the image after overcompression and encryption being transmitted to mesh by low-bandwidth network
In marking device.
In present embodiment, the target device can be the devices such as server, computer, smart phone.The present invention couple
Image is compressed, after encryption, image can be transmitted in destination apparatus by low-bandwidth network, to realize reduction
The data volume of image transmitting and the purpose for saving network bandwidth.
History image in this case using shooting realizes the more efficient compression to present image, to reduce present image
Data volume, reduce and be transmitted to the data volume of distal end, improve efficiency of transmission.In addition, the figure encrypted to compressed image
As encryption data can be made of and the cyclic redundancy check coding that image image to be shown encodes and encrypts in image to be displayed
Attached cyclic redundancy check encodes after coding, since cyclic redundancy check encoding ratio image to be displayed data are much smaller, Ke Yi great
The big data volume for saving image transmitting.
Embodiment three
Fig. 4 is the schematic diagram of 7 preferred embodiment of electronic equipment of the present invention.
The electronic equipment 7 includes memory 71, processor 72 and is stored in the memory 71 and can be described
The computer program 73 run on processor 72.The processor 72 realizes that above-mentioned image passes when executing the computer program 73
Step in transmission method embodiment, such as step 101~104 shown in FIG. 1.Alternatively, the processor 72 executes the calculating
The function of each module/module in above-mentioned image transmission embodiment is realized when machine program 73, such as the module 401 in Fig. 3~
404。
Illustratively, the computer program 73 can be divided into one or more module/modules, it is one or
Multiple module/modules are stored in the memory 71, and are executed by the processor 72, to complete the present invention.Described one
A or multiple module/modules can be the series of computation machine program instruction section that can complete specific function, and described instruction section is used
In implementation procedure of the description computer program 73 in the electronic equipment 7.For example, the computer program 73 can be by
Acquisition module 401, compression module 402, encrypting module 403 and the sending module 404 being divided into Fig. 3, each module concrete function
Referring to embodiment two.
The electronic equipment 7 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.It will be understood by those skilled in the art that the schematic diagram is only the example of electronic equipment 7, do not constitute to electronic equipment 7
Restriction, may include perhaps combining certain components or different components, such as institute than illustrating more or fewer components
Stating electronic equipment 7 can also include input-output equipment, network access equipment, bus etc..
Alleged processor 72 can be central processing module (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), 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 72 is also possible to any conventional processing
Device etc., the processor 72 are the control centres of the electronic equipment 7, utilize various interfaces and the entire electronic equipment of connection
7 various pieces.
The memory 71 can be used for storing the computer program 73 and/or module/module, and the processor 72 passes through
Operation executes the computer program and/or module/module being stored in the memory 71, and calls and be stored in memory
Data in 71 realize the various functions of the meter electronic equipment 7.The memory 71 can mainly include storing program area and deposit
Store up data field, wherein storing program area can application program needed for storage program area, at least one function (for example sound is broadcast
Playing function, image player function etc.) etc.;Storage data area can store according to electronic equipment 7 use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 71 may include high-speed random access memory, it can also include non-volatile
Property memory, such as hard disk, memory, plug-in type hard 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 part.
If the integrated module/module of the electronic equipment 7 is realized in the form of software function module and as independent
Product when selling or using, can store in a computer readable storage medium.Based on this understanding, the present invention is real
All or part of the process in existing above-described embodiment method, can also instruct relevant hardware come complete by computer program
At the computer program can be stored in a computer readable storage medium, and the computer program is held by processor
When row, it can be achieved that the step of above-mentioned each embodiment of the method.Wherein, the computer program includes computer program code, institute
Stating computer program code can be source code form, object identification code form, executable file or certain intermediate forms etc..It is described
Computer-readable medium may include: any entity or device, recording medium, U that can carry the computer program code
Disk, mobile hard disk, magnetic disk, CD, computer storage, read-only memory (ROM, Read-Only Memory), arbitrary access
Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It needs
It is bright, the content that the computer-readable medium includes can according in jurisdiction make laws and patent practice requirement into
Row increase and decrease appropriate, such as do not include electric load according to legislation and patent practice, computer-readable medium in certain jurisdictions
Wave signal and telecommunication signal.
In several embodiments provided by the present invention, it should be understood that disclosed electronic equipment and method, Ke Yitong
Other modes are crossed to realize.For example, electronic equipment embodiment described above is only schematical, for example, the module
Division, only a kind of logical function partition, there may be another division manner in actual implementation.
It, can also be in addition, each functional module in each embodiment of the present invention can integrate in same treatment module
It is that modules physically exist alone, can also be integrated in equal modules with two or more modules.Above-mentioned integrated mould
Block both can take the form of hardware realization, can also realize in the form of hardware adds software function module.
It is obvious to a person skilled in the art that invention is not limited to the details of the above exemplary embodiments, Er Qie
In the case where without departing substantially from spirit or essential attributes of the invention, the present invention can be realized in other specific forms.Therefore, no matter
From the point of view of which point, the present embodiments are to be considered as illustrative and not restrictive, and the scope of the present invention is by appended power
Benefit requires rather than above description limits, it is intended that all by what is fallen within the meaning and scope of the equivalent elements of the claims
Variation is included in the present invention.Any reference signs in the claims should not be construed as limiting the involved claims.This
Outside, it is clear that one word of " comprising " is not excluded for other modules or step, and odd number is not excluded for plural number.It is stated in electronic equipment claim
Multiple modules or electronic equipment can also be implemented through software or hardware by the same module or electronic equipment.The first, the
Second-class word is used to indicate names, and is not indicated any particular order.
Finally it should be noted that the above examples are only used to illustrate the technical scheme of the present invention and are not limiting, although reference
Preferred embodiment describes the invention in detail, those skilled in the art should understand that, it can be to of the invention
Technical solution is modified or equivalent replacement, without departing from the spirit and scope of the technical solution of the present invention.
Claims (10)
1. a kind of image transfer method, which is characterized in that the described method includes:
Obtain image;
Compression processing is carried out to the image of acquisition;
Compressed image is encrypted;And
Image after overcompression and encryption is transmitted in target device by low-bandwidth network.
2. image transfer method as described in claim 1, which is characterized in that carrying out compression processing to the image of acquisition includes:
The image currently obtained is compared with the image that one or more history obtain, according to comparison result by multiple compressions
A reduced rule is selected to compress the image currently obtained in rule.
3. image transfer method as claimed in claim 2, which is characterized in that it is described according to comparison result by multiple reduced rules
One reduced rule of middle selection carries out compression to the image currently obtained
Calculate the consistent block ratio of the previous image of the present image of the present image and acquisition, wherein by the current figure
Picture and the previous image are respectively divided into the block of identical size, calculate the corresponding blocks of the present image and the previous image
Similarity and the block that similarity is greater than predetermined threshold is defined as the consistent block of the present image Yu the previous image, and
Consistent block ratio is calculated by formula R=n/N, wherein n is the number of consistent block, and N is present image or previous image institute
The number of the block of division, R are consistent block ratio;
Judge whether the present image and the acquisition time interval of the previous image are less than predetermined first threshold;
Judge whether consistent block ratio is greater than predetermined second threshold when the acquisition time interval is less than the predetermined first threshold
Value;And
If consistent block ratio selects the first reduced rule to compress present image when being greater than the predetermined second threshold, wherein
First reduced rule is the first residual image for calculating the present image and the previous image, to first residual error
Image is compressed to obtain the compressing image data of present image.
4. image transfer method as claimed in claim 3, which is characterized in that the method also includes:
When the acquisition time interval is not more than the predetermined second threshold not less than predetermined first threshold or consistent block ratio,
Calculate separately the consistent block ratio of the image of the present image and one or more history acquisitions;
Consistent block ratio is judged whether there is greater than the image that the history of predetermined third threshold value obtains;And
When the image that the history for being greater than predetermined third threshold value there are consistent block rate value obtains, select the second reduced rule to institute
It states present image to be compressed, second reduced rule is to calculate separately the present image to obtain at least one history
The statistical nature of image selects statistical nature to go through with the image that the immediate history of the present image obtains as selected
History image calculates the second residual image of the selected history image and the present image, to second residual image into
Row compression obtains the compressing image data of the present image.
5. image transfer method as claimed in claim 4, which is characterized in that the method also includes:
When the image that the history for being greater than predetermined third threshold value there is no consistent block rate value obtains, third reduced rule pair is selected
The present image is compressed, wherein the third reduced rule is the characteristic image for calculating the image that multiple history obtain,
The present image is expressed as to the sum of linear combination and the third residual image of the characteristic image, it is then residual to the third
Difference image is compressed to obtain the compressing image data of the present image.
6. image transfer method as described in claim 1, which is characterized in that described that compressed image is encrypted
Include:
Compressed image is encrypted with first key, obtains image encryption data;
The beginning flag symbol of described image encryption data is set, as to the decoded beginning flag of described image encryption data;
Cyclic redundancy check is carried out to described image encryption data and encodes to obtain check code, and by described image encryption data and institute
It states check code and scrambling encryption is carried out by the second key;And
The length for obtaining described image encryption data is added to after encrypting the length third key of described image encryption data
In described image encryption data, and in described image encryption data be arranged encryption data termination identifier.
7. image transfer method as claimed in claim 6, which is characterized in that described to be recycled to described image encryption data
Redundancy check encodes to obtain check code
Cyclic redundancy check is carried out using CRC-16 remainder table methods to described image encryption data to encode to obtain check code.
8. a kind of image transmission, which is characterized in that described device includes:
Module is obtained, for obtaining image;
Compression module, for carrying out compression processing to the image of acquisition;
Encrypting module, for compressed image to be encrypted;And
Sending module, for the image after overcompression and encryption to be transmitted in target device by low-bandwidth network.
9. a kind of electronic equipment, it is characterised in that: the electronic equipment includes processor, and the processor is for executing memory
It realizes when the computer program of middle storage such as any one of claim 1-7 described image transmission method.
10. a kind of computer readable storage medium, is stored thereon with computer program, it is characterised in that: the computer program
It realizes when being executed by processor such as any one of claim 1-7 described image transmission method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527698.7A CN109788160A (en) | 2018-12-13 | 2018-12-13 | Image transfer method, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811527698.7A CN109788160A (en) | 2018-12-13 | 2018-12-13 | Image transfer method, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109788160A true CN109788160A (en) | 2019-05-21 |
Family
ID=66495968
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811527698.7A Pending CN109788160A (en) | 2018-12-13 | 2018-12-13 | Image transfer method, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109788160A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115834926A (en) * | 2022-11-21 | 2023-03-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409813A (en) * | 2007-10-08 | 2009-04-15 | 陈诚 | Image encoding method for preventing and identifying image tamper |
CN105763855A (en) * | 2016-04-22 | 2016-07-13 | 微景天下(北京)科技有限公司 | Image transmission system and image transmission method |
KR20160129704A (en) * | 2015-04-30 | 2016-11-09 | 삼성전자주식회사 | Electronic device, adapter device and video data processing method thereof |
CN107302659A (en) * | 2017-06-19 | 2017-10-27 | 成都优孚达信息技术有限公司 | A kind of data compression method for network transmission |
CN206602594U (en) * | 2017-03-30 | 2017-10-31 | 漯河职业技术学院 | A kind of computer safety of image transmitting device |
-
2018
- 2018-12-13 CN CN201811527698.7A patent/CN109788160A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101409813A (en) * | 2007-10-08 | 2009-04-15 | 陈诚 | Image encoding method for preventing and identifying image tamper |
KR20160129704A (en) * | 2015-04-30 | 2016-11-09 | 삼성전자주식회사 | Electronic device, adapter device and video data processing method thereof |
CN105763855A (en) * | 2016-04-22 | 2016-07-13 | 微景天下(北京)科技有限公司 | Image transmission system and image transmission method |
CN206602594U (en) * | 2017-03-30 | 2017-10-31 | 漯河职业技术学院 | A kind of computer safety of image transmitting device |
CN107302659A (en) * | 2017-06-19 | 2017-10-27 | 成都优孚达信息技术有限公司 | A kind of data compression method for network transmission |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115834926A (en) * | 2022-11-21 | 2023-03-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
CN115834926B (en) * | 2022-11-21 | 2023-11-21 | 深圳市超时代软件有限公司 | Video encryption method based on H.265 entropy coding binarization |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106170922B (en) | The source code of data and decoded device and method | |
KR102240164B1 (en) | Techniques for encoding, decoding and representing high dynamic range images | |
WO2018103452A1 (en) | Method and device for encoding and decoding information bitmap, and storage medium | |
CN116506073B (en) | Industrial computer platform data rapid transmission method and system | |
CN1675842B (en) | Method and apparatus arithmetic coding, and related decoding method | |
CN105162686A (en) | Multi-form instant information hiding communication method and system based on image medium | |
CN110519601A (en) | The coding method of digital video and device | |
CN116108506A (en) | Meta-universe digital asset security management system | |
CN108259908A (en) | For coding and decoding the method and apparatus of pixel list | |
US10075183B2 (en) | Compression and encryption of a file | |
CN109788160A (en) | Image transfer method, device, electronic equipment and storage medium | |
CN105791832A (en) | Data coding method, data decoding method, data coding system and data decoding system | |
CN104104954A (en) | Tile-based compression and decompression for graphic applications | |
WO2016167718A1 (en) | Improved compression and/or encryption of a file | |
CN102754399B (en) | For realizing the apparatus and method of Cryptographic Hash Function | |
CN110855990B (en) | Image encoding method, image decoding method, computer device, and image processing system | |
US10505713B2 (en) | Compression and/or encryption of a file | |
CN109729233A (en) | Information concealing method, device, storage medium and electronic equipment based on image | |
CN117579896B (en) | Unmanned aerial vehicle video transmission processing method, device, equipment and storage medium | |
CN116881871B (en) | Model watermark embedding method, device, computer equipment and storage medium | |
CN116132759B (en) | Audio and video stream synchronous transmission method and device, electronic equipment and storage medium | |
CN110099279B (en) | Method for adjusting lossy compression based on hardware | |
CN116980603A (en) | Video data processing method, device, computer equipment and storage medium | |
CN115278311A (en) | Video encryption method and device based on macro block | |
CN115147627A (en) | Visual print processing method, device, terminal and storage medium for verifying credibility of video |
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: 20190521 |