CN104112100B - Data-hiding method and device based on bitmap - Google Patents

Data-hiding method and device based on bitmap Download PDF

Info

Publication number
CN104112100B
CN104112100B CN201410299236.XA CN201410299236A CN104112100B CN 104112100 B CN104112100 B CN 104112100B CN 201410299236 A CN201410299236 A CN 201410299236A CN 104112100 B CN104112100 B CN 104112100B
Authority
CN
China
Prior art keywords
data
space
bitmap
hiding
module
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.)
Active
Application number
CN201410299236.XA
Other languages
Chinese (zh)
Other versions
CN104112100A (en
Inventor
余莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Huaduo Network Technology Co Ltd
Original Assignee
Guangzhou Huaduo Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Huaduo Network Technology Co Ltd filed Critical Guangzhou Huaduo Network Technology Co Ltd
Priority to CN201410299236.XA priority Critical patent/CN104112100B/en
Publication of CN104112100A publication Critical patent/CN104112100A/en
Application granted granted Critical
Publication of CN104112100B publication Critical patent/CN104112100B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/16Program or content traceability, e.g. by watermarking

Abstract

The invention discloses a kind of data-hiding method and device based on bitmap, belong to image watermarking field.Methods described includes:Read the data field of bitmap, the data field is stored with the colouring information of each pixel in the bitmap;Space that the partial binary position in each byte of colouring information constituted as data space will be used to storing in the data field;The data that needs are hidden are write in the data space.By the present invention in that the data storage position with bitmap in itself needs hiding data to store, the data volume that can substantially increase image currently with the method for image concealing data is solved, and the problem of the hiding data of afterbody is easily directly found by 16 system editing machines;The data volume for having reached the image after concealing data keeps constant, and hiding data are difficult the effect being found.

Description

Data-hiding method and device based on bitmap
Technical field
The present invention relates to image processing field, more particularly to a kind of data-hiding method and device based on bitmap.
Background technology
Data hiding technique is a kind of technology being hidden in secret data in other media (such as audio, video, image). It generally using the one kind in audio, video or image as carrier, secret data is embedded.The purpose of image watermarking is Ensure that hiding data are not attracted much attention.
At present, a kind of method by image watermarking in image is:Directly increase the data to be hidden in image end, The method is by using Windows built-in file copy command replication, you can be done directly.Now, the image is by common When image display program is opened, still can normally show.
During the embodiment of the present invention is realized, inventor has found that above-mentioned technology at least has problems with:Above-mentioned number Although the purpose of hiding data can be played according to concealing technology, the data volume that can make picture by the above method substantially increases Greatly, such as, the data volume of original image is 3MB, it is necessary to the data volume of hiding data is 1MB, then the image after hiding data Data volume is 4MB.In addition, the image after above-mentioned hiding data is also easy to directly find the hiding number of afterbody by 16 system editing machines According to.
The content of the invention
In order to the method solved currently with image concealing data can substantially increase image size, and easily by 16 system editors Device directly finds the problem of the hiding data of afterbody, the embodiment of the invention provides a kind of data-hiding method based on bitmap. The technical scheme is as follows:
According to an aspect of the invention, there is provided a kind of data-hiding method based on bitmap, methods described includes:
Read the data field of bitmap, the data field is stored with the colouring information of each pixel in the bitmap;
The space that the partial binary position in each byte of colouring information is constituted will be used to store in the data field As data space;
The data that needs are hidden are write in the data space;
What the partial binary position that will be used to store in the data field in each byte of colouring information was constituted Space as data space, including:
The continuous n binary system since highest order in each byte for store colouring information will be used in the data field Used as the data space, n is positive integer in the space that position is constituted.
Optionally, the partial binary position institute that will be used to store in the data field in each byte of colouring information Before the space of composition is as data space, also include:
Detect the colouring information in the data field for storing single pixel point number of bits whether reach it is predetermined Digit;
If the number of bits of the colouring information for storing single pixel point reaches the predetermined figure, institute is performed Stating will be used to storing space that the partial binary position in each byte of colouring information constituted as number in the data field The step of according to memory space.
Optionally, after the data that will need to hide are write in the data space, also include:
Whether the color distortion degree between bitmap after the detection write-in data and the bitmap for not writing the data More than predetermined threshold;
If detecting, the color distortion degree has exceeded the predetermined threshold, will be used to deposit in the data field again The space that is constituted of n-1 binary digit in each byte of colouring information is stored up as data space, and by the need The data to be hidden write the data space.
Optionally, before the data that will need to hide are write in the data space, also include:
Calculate the data space can data storage amount;
Whether the detection data volume for needing hiding data can data storage amount more than described in;
If testing result be the data volume for needing hiding data more than it is described can data storage amount, according to described Can data storage amount from it is described need hiding data in intercept a part of data as needing hiding number in the bitmap According to.
According to the second aspect of the invention, there is provided a kind of image watermarking device based on bitmap, described device includes:
Data read module, the data field for reading bitmap, the data field is stored with each pixel in the bitmap The colouring information of point;
Space determining module, in the data field of reading the data read module for storing colouring information Each byte in the space that is constituted of partial binary position as data space;
Data write. module, the data for hiding data will to be needed to write the space determining module determination are deposited In storage space;
The space determining module, in the data field of reading the data read module for storing color The space that continuous n binary digit in each byte of information since highest order is constituted is empty as the data storage Between, n is positive integer.
Optionally, described device, also includes:
Digit detection module, for being used to store single picture in the data field for detecting the data read module reading Whether the number of bits of the colouring information of vegetarian refreshments reaches predetermined figure;
The space determining module, if being for storing single pixel for the testing result of the digit detection module The number of bits of colouring information of point reaches the predetermined figure, then perform described will be used to store color in the data field The step of space that partial binary position in each byte of information is constituted is as data space.
Optionally, described device, also includes:Difference test module and the space true module of weight;
The Difference test module, for detecting that the Data write. module writes the bitmap after the data and do not write Whether the color distortion degree between the bitmap of the data exceedes predetermined threshold;
The true module of the space weight, during for detecting that the color distortion degree has exceeded the predetermined threshold, again For n-1 binary system in each byte for storing colouring information in the data field that the data read module is read The space that position is constituted is used as data space;Recycle the Data write. module needs hiding data to write by described In the data space that the true module of the space weight determines.
Optionally, described device, also includes:Capacity calculation module and capacity check module;
The capacity calculation module, can data storage amount for calculate the data space;
The capacity check module, for detecting whether the data volume for needing hiding data can store more than described Data volume;If testing result be the data volume for needing hiding data more than it is described can data storage amount, according to described Can data storage amount from it is described need hiding data in intercept a part of data as needing described in the bitmap to hide Data.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
Hiding data are needed to store by using bitmap data storage position in itself, is solved hidden currently with image Hiding the method for data can substantially increase the data volume of image, and easily directly find the hiding data of afterbody by 16 system editing machines Problem;The data volume for having reached the image after concealing data keeps constant, and hiding data are difficult the effect being found.
Brief description of the drawings
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows and meets implementation of the invention Example, and be used to explain principle of the invention together with specification.
Fig. 1 is a kind of method flow diagram of the data-hiding method based on bitmap according to an exemplary embodiment;
Fig. 2A is a kind of method flow of the data-hiding method based on bitmap according to another exemplary embodiment Figure;
Fig. 2 B are the memory space schematic diagrames according to an exemplary embodiment;
Fig. 3 is a kind of block diagram of the image watermarking device based on bitmap according to an exemplary embodiment;
Fig. 4 is a kind of structure square frame of the image watermarking device based on bitmap according to another exemplary embodiment Figure;
Fig. 5 is the structural representation of terminal according to an exemplary embodiment or server.
Specific embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous key element.Following exemplary embodiment Described in implementation method do not represent and the consistent all implementation methods of the present invention.Conversely, they be only with it is such as appended The example of the consistent apparatus and method of some aspects being described in detail in claims, of the invention.
Mainly illustrated with the carrier of hiding data as bitmap herein.
Bitmap (bitmap) is a kind of image represented using pixel array, such as the bitmap of 320*240 just includes The pixel array of the row of 320 row * 240, totally 76800 pixels.Wherein, the colouring information of each pixel can be by gray value table Show;Can also be represented by three combinations of colouring information of RGB (Red Green Blue, RGB);Can also be by ARGB (AlphaRed Green Blue, transparency-RGB) four combinations of colouring information are represented.
In different bitmaps, the required number of bits for using can be with storage for the colouring information of each pixel It is divided into 1,4,8,16,24 and 32 etc., digit more at most color is abundanter.Correspondingly, the data volume of bitmap can be bigger.
When a colouring information for pixel only with bit to represent when because bit can only Two kinds of colors of black and white are represented, so also referred to as bitonal bitmap.
When a colouring information for pixel using 24 RGB combinations to represent when, due to red R use 8 binary systems Position is represented, green G is represented using 8 binary digits, blueness B uses 8 binary systems, and each color span is 0~255,0 Represent lightness minimum, 255 represent lightness highest, it is possible to represent shades of colour, referred to as real color bitmap.
When a colouring information for pixel is combined to represent using 32 ARGB, due to increased a transparency A, A represents that span represents fully transparent, 255 representatives opaque, Ke Yigeng completely for 0~255,0 using 8 binary digits Represent bitmap well.
Fig. 1 is refer to, the side of the data-hiding method based on bitmap provided it illustrates one embodiment of the invention Method flow chart.The method can be used in terminal or in server, and the present embodiment is applied to be illustrated in terminal in this way It is bright.The method can include following several steps:
Step 101, reads the data field of bitmap, and data field is stored with the colouring information of each pixel in bitmap;
The data file of bitmap mainly includes:The parts such as file header, message bit pattern head and data field, the data field of bitmap is deposited Contain the colouring information of each pixel in bitmap.
Step 102, will be used to store what the partial binary position in each byte of colouring information was constituted in data field Space is used as data space;
One byte has 8 bits, and partial binary position can be the part in 8 bits.
Step 103, it would be desirable in hiding data write-in data space.
In sum, the data-hiding method based on bitmap that the present embodiment is provided, by using bitmap storage in itself Data bit needs hiding data to store, and solves the number that can substantially increase image currently with the method for image concealing data According to amount, and the problem of the hiding data of afterbody is easily directly found by 16 system editing machines;The image after concealing data is reached Data volume keep constant and hiding data to be difficult the effect being found.
Fig. 2A is refer to, the method for the data-hiding method based on bitmap provided it illustrates another embodiment of the present invention Flow chart.The method can be used in terminal or in server, and the present embodiment is applied to be illustrated in terminal in this way. The method can include following several steps:
Step 201, reads the data field of bitmap, and data field is stored with the colouring information of each pixel in bitmap;
The data file of bitmap mainly includes:The parts such as file header, message bit pattern head and data field, the data field of bitmap is deposited The colouring information of each pixel in bitmap is contained, terminal can read these information in bitmap.
Whether step 202, the number of bits of the colouring information in detection data area for storing single pixel point reaches Predetermined figure;
Because the pseudo color bitmap stored using 24 in the following manner, the not actual pixels point that data field represents Colouring information, but palette index value, are unsuitable for the mode of the present embodiment hiding data and institute's energy hiding data amount are too small, therefore And only carry out hiding data using the real color bitmap of 24 and the above in the present embodiment.
Therefore, terminal after reading a data field for bitmap, it is necessary to go detect this bitmap data field in use Whether predetermined figure is reached in the number of bits of the colouring information of storage single pixel point.With the predetermined figure in the present embodiment Illustrated for 24.
That is, for the colouring information of the single pixel point in bitmap, 1,4,8,16,24 may be used Stored with the modes such as 32.Whether terminal can detect the colouring information of the single pixel point in current bitmap using 24 Mode is stored or 32 modes are stored;If the colouring information of the single pixel point in current bitmap uses 24 Mode is stored or 32 modes are stored, then into step 203;If the face of the single pixel point in current bitmap Color information is stored using 1,4,8 or 16 mode, then termination process.
Step 203, if the number of bits of the colouring information for storing single pixel point reaches predetermined figure, will It is used to store the space that the partial binary position in each byte of colouring information constituted in data field empty as data storage Between;
After detecting current bitmap for real color bitmap, terminal will be used to store each of colouring information terminal in data field Used as data space, n is positive integer in the space that n binary digit in individual byte since highest order is constituted.This reality Apply and illustrated with n=3 in example.
With reference to Fig. 2 B are referred to, if the colouring information of single pixel point is stored using 24 RGB modes in current bitmap, Then terminal is using first 3 in octet shared by each colouring information as data space.
Step 204, calculate data space can data storage amount;
So that the resolution ratio of current bitmap is as X*Y as an example, current bitmap includes X*Y pixel, and each pixel includes 3 Colouring information, each colouring information extracts 3 as data space, then the data space can data storage amount For:X*Y*3*3/8 bytes.
Step 205, whether detection needs the data volume of hiding data to be more than can data storage amount;
Then terminal detection need hiding data data volume whether more than data space can data storage amount. If testing result is more than into step 206;If testing result is to be not more than, into step 207.
Step 206, if the data volume of testing result data hiding required for being more than can data storage amount, according to can Data storage amount intercepts a part of data as needing hiding data in bitmap from hiding data are needed;
If testing result is more than terminal intercepts a part of data and needed as in bitmap from hiding data are needed The data to be hidden, the data volume size of a part of data for intercepting out be equal to or less than can data storage amount size.
Step 207, it would be desirable to hiding data write-in data space.
Terminal will need hiding data to write data space.This step can include following sub-step:
1st, terminal resets each binary digit in data space;
2nd, terminal will need hiding data to write data space in order.
In sum, the data-hiding method based on bitmap that the present embodiment is provided, by using bitmap storage in itself Data bit needs hiding data to store, and solves the number that can substantially increase image currently with the method for image concealing data According to amount, and the problem of the hiding data of afterbody is easily directly found by 16 system editing machines;The image after concealing data is reached Data volume keep constant and hiding data to be difficult the effect being found.
It should be added that, by the above method by image watermarking in the bitmap after, part pixel in bitmap Color can change.Generally, this change is not obvious for human eye.But if this change is very bright It is aobvious, redefine data space after can n binary digit in above-described embodiment be reduced, such as it is reduced to n-1 After redefine data space.The process can be performed by technical staff, it is also possible to be performed by terminal.
When said process by terminal to perform when, the present embodiment further preferably comprises the following steps:
Step 208, detection write-in data after bitmap and do not write data bitmap between color distortion degree whether More than predetermined threshold;
Terminal can detect write-in data after bitmap and do not write data bitmap between color distortion degree whether More than predetermined threshold.
Terminal detect two bitmaps between color distortion degree when, a kind of detection method be using RGB weight aberration Formula detects color distortion, and the RGB weighting colour difference formulas used by the present embodiment can be:
Wherein D is color distortion degree, wr,wg,wbBe according to human eye for the color sensitivity of red, green, blue three difference and Fixed weight coefficient, the present embodiment can be using (3,4,2) as this weight coefficient, wherein ri,gi,biIt is position after write-in data The value of R, G, B of the pixel of figure, rj,gj,bjIt is the value of R, G, B of the pixel of bitmap before write-in data, can be with this formula The value of chromatism of each pixel color change is calculated, entirety after the write-in data of bitmap can be calculated according to this value of chromatism afterwards The average color difference degree of change;Using this formula calculate maximum color difference degree, that is, calculate (0,0,0) and (255, 255th, 255) 2 points of value of chromatism;The present embodiment can be with the 20% of maximum color difference degree as predetermined threshold, if put down Equal color distortion degree is more than this predetermined threshold, then need according to circumstances to reduce the number of bits shared by each byte.
Step 209, if detecting, color distortion degree has exceeded predetermined threshold, will be used to store face in data field again The space that n-1 binary digit in each byte of color information is constituted is used as data space;
What terminal was again constituted n-1 binary digit for being used to store in data field in each byte of colouring information Space is used as data space.Such as, n=3, then after n is reduced to 2 by terminal, reenter step 204.Again such as, n =2, then after n is reduced to 1 by terminal, reenter step 204.
By above-mentioned steps 208 and step 209, the present embodiment is write before and after picture by the data to be hidden of calculating, figure Whether the change of piece aberration exceedes threshold value;Reach under the premise of picture change is unconspicuous, by image watermarking to picture Effect, and then reduce the probability that hiding data are found.
Supplementary notes are also needed to, before it will need hiding data write-in data space, meeting can for the present embodiment So that hiding data will be needed to be compressed treatment, compressing data can reduce size of data, and increasing the present embodiment institute can be hidden The data volume of Tibetan;The data such as to be hidden are text formatting or Office form clear formats, and it is compressed can evade Filtering sensitive words;Compressed data can also make more to facilitate during extraction data.
Fig. 3 is refer to, the structure of the image watermarking device based on bitmap provided it illustrates one embodiment of the invention Block diagram.The image watermarking device for being based on bitmap can be combined into terminal or service by software, hardware or both The all or part of device.This is based on the image watermarking device of bitmap, including:Data read module 310, space determining module 320th, Data write. module 330;
Data read module 310, the data field for reading bitmap, data field is stored with the face of each pixel in bitmap Color information;
Space determining module 320, in the data field of reading data read module 310 for storing colouring information The space that partial binary position in each byte is constituted is used as data space;
Data write. module 330, for the data storage that hiding data write-in space determining module 320 will be needed to determine In space.
In sum, the image watermarking device based on bitmap that the present embodiment is provided, by using bitmap storage in itself Data bit needs hiding data to store, and solves the number that can substantially increase image currently with the method for image concealing data According to amount, and the problem of the hiding data of afterbody is easily directly found by 16 system editing machines;The image after concealing data is reached Data volume keep constant and hiding data to be difficult the effect being found.
Fig. 4 is refer to, the knot of the image watermarking device based on bitmap provided it illustrates another embodiment of the present invention Structure block diagram.The image watermarking device for being based on bitmap can be combined into terminal or clothes by software, hardware or both The all or part of business device.The image watermarking device for being based on bitmap includes:Data read module 310, space determines mould Block 320, Data write. module 330;
Data read module 310, the data field for reading bitmap, data field is stored with the face of each pixel in bitmap Color information;
Space determining module 320, in the data field of reading data read module for storing each of colouring information The space that partial binary position in individual byte is constituted is used as data space;
Data write. module 330, for the data storage that hiding data write-in space determining module 320 will be needed to determine In space, terminal or server will need hiding data to write data space.
Alternatively, Data write. module 330 also includes:Data wipe unit 332 and data write unit 334;
Data wipe unit 332, for each binary digit in data space to be reset;
Data write unit 334, for hiding data will to be needed to write data space in order.
Optionally, described device, also includes:
Digit detection module 340, the binary system of the colouring information for being used to store single pixel point in detection data area Whether digit reaches predetermined figure;
Space determining module 320, if being for storing single pixel point for the testing result of digit detection module 340 The number of bits of colouring information reach predetermined figure, then perform each byte by being used to store colouring information in data field In the space that is constituted of partial binary position as data space the step of.
Optionally, space determining module 320, for that will be used to storing in data field in each byte of colouring information from most Used as data space, n is positive integer in the space that the continuous n binary digit that a high position starts is constituted.
Optionally, described device, also includes:Difference test module 350 and the true module 360 of space weight;
Difference test module 350, for detecting the color between the bitmap after write-in data and the bitmap for not writing data Whether difference degree exceedes predetermined threshold;
The true module 360 of space weight, during for detecting that color distortion degree has exceeded predetermined threshold, again by digital independent The space conduct constituted for n-1 binary digit in each byte for storing colouring information in the data field that module reads Data space;The number for recycling Data write. module 330 that the hiding data write-in true module 360 of space weight will be needed to determine According in memory space.
Optionally, described device, also includes:Capacity calculation module 370 and capacity check module 380;
Capacity calculation module 370, can data storage amount for calculate data space;
Capacity check module 380, whether the data volume for detecting the data for needing hiding is more than can data storage amount;If Testing result be the data for needing hiding data volume more than can data storage amount, then according to can data storage amount from needing to hide Data in intercept a part of data as needing hiding data in bitmap.
In sum, the image watermarking device based on bitmap that the present embodiment is provided, by using bitmap storage in itself Data bit needs hiding data to store, and solves the number that can substantially increase image currently with the method for image concealing data According to amount, and the problem of the hiding data of afterbody is easily directly found by 16 system editing machines;The image after concealing data is reached Data volume keep constant and hiding data to be difficult the effect being found.
It should be added that, the present embodiment is write before and after picture by the data to be hidden of calculating, picture aberration Whether change exceedes threshold value;Reach under the premise of picture change is unconspicuous, by the effect in image watermarking to picture, and then Reduce the probability that hiding data are found.
It should be added that, the present embodiment, can be to hidden before the data write-in data space that will be hidden The data of Tibetan are compressed treatment, and compressing data can reduce size of data, increase the data volume that the present embodiment can be hidden; The data such as to be hidden are text formatting or Office form clear formats, and it is compressed can evade filtering sensitive words; Compressed data can also make more to facilitate during extraction data.
Fig. 5 is refer to, the terminal or the structural representation of server provided it illustrates one embodiment of the invention.Terminal Or server 500 is including CPU (CPU) 501, including random access memory (RAM) 502 and read-only storage (ROM) 503 system storage 504, and connection system memory 504 and CPU 501 system bus 505. Terminal or server 500 also include the basic input/output (I/ of transmission information between each device in help computer O systems) 506, and for the mass-memory unit of storage program area 513, application program 514 and other program modules 515 507。
Basic input/output 506 is included for the display 508 of display information and for user input information The input equipment 509 of such as mouse, keyboard etc.Wherein display 508 and input equipment 509 is all by being connected to system bus 505 IOC 510 is connected to CPU 501.Basic input/output 506 can also include defeated Enter o controller 510 for receiving and processing from the defeated of the multiple other equipment such as keyboard, mouse or electronic touch pen Enter.Similarly, IOC 510 also provides output to display screen, printer or other kinds of output equipment.
Mass-memory unit 507 is connected by being connected to the bulk memory controller (not shown) of system bus 505 To CPU 501.Mass-memory unit 507 and its associated computer-readable medium are terminal or server 500 provide non-volatile memories.That is, mass-memory unit 507 can include that such as hard disk or CD-ROM drive The computer-readable medium (not shown) of device etc.
Without loss of generality, the computer-readable medium can include computer-readable storage medium and communication media.Computer Storage medium is including for storage computer-readable instruction, data structure, program module or information etc. other data Volatibility and non-volatile, removable and irremovable medium that any method or technique is realized.Computer-readable storage medium includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, tape Box, tape, disk storage or other magnetic storage apparatus.Certainly, skilled person will appreciate that the computer-readable storage medium It is not limited to above-mentioned several.Above-mentioned system storage 504 and mass-memory unit 507 may be collectively referred to as memory.
According to various embodiments of the present invention, terminal or server 500 can also be by network connections such as internets Remote computer operation on to network.Namely terminal or server 500 can be by the networks that are connected on system bus 505 Interface unit 511 is connected to network 512, in other words, it is also possible to other kinds of net is connected to using NIU 511 Network or remote computer system (not shown).
The memory also include one or more than one program, one or more than one program storage in In memory, one or more than one program bag is containing for carrying out the data based on bitmap provided in an embodiment of the present invention The instruction of hidden method.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware To complete, it is also possible to instruct the hardware of correlation to complete by program, described program can be stored in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all it is of the invention spirit and Within principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.

Claims (8)

1. a kind of data-hiding method based on bitmap, it is characterised in that methods described includes:
Read the data field of bitmap, the data field is stored with the colouring information of each pixel in the bitmap;
To be used to storing in the data field space that the partial binary position in each byte of colouring information constituted as Data space;
The data that needs are hidden are write in the data space;
The space that the partial binary position that will be used to store in the data field in each byte of colouring information is constituted As data space, including:
The continuous n binary digit institute since highest order in each byte for store colouring information will be used in the data field Used as the data space, n is positive integer in the space of composition.
2. method according to claim 1, it is characterised in that described to be used to store colouring information in the data field Before the space that partial binary position in each byte is constituted is as data space, also include:
Detect whether the number of bits of the colouring information in the data field for storing single pixel point reaches predetermined figure;
If the number of bits of the colouring information for storing single pixel point reaches the predetermined figure, described general is performed Deposited as data in the space constituted for the partial binary position in each byte for storing colouring information in the data field The step of storage space.
3. method according to claim 2, it is characterised in that described that hiding data will be needed to write the data storage After in space, also include:
Detect whether the color distortion degree between the bitmap after the write-in data and the bitmap for not writing the data exceedes Predetermined threshold;
If detecting, the color distortion degree has exceeded the predetermined threshold, will be used to store face in the data field again The space that continuous n-1 binary digit in each byte of color information since highest order is constituted is empty as data storage Between, and need hiding data to write the data space by described.
4. according to any described method of claims 1 to 3, it is characterised in that described that hiding data write-in will be needed described Before in data space, also include:
Calculate the data space can data storage amount;
Whether the detection data volume for needing hiding data can data storage amount more than described in;
If testing result be the data volume for needing hiding data more than it is described can data storage amount, can be deposited according to Storage data volume from it is described need hiding data in intercept a part of data as needing hiding data in the bitmap.
5. a kind of image watermarking device based on bitmap, it is characterised in that described device includes:
Data read module, the data field for reading bitmap, the data field is stored with each pixel in the bitmap Colouring information;
Space determining module, in the data field of reading the data read module for storing each of colouring information The space that partial binary position in individual byte is constituted is used as data space;
Data write. module, for hiding data will to be needed to write the data storage sky that the space determining module determines Between in;
The space determining module, opens in each byte of colouring information for that will be used to storing in the data field from highest order Used as the data space, n is positive integer in the space that the continuous n binary digit for beginning is constituted.
6. device according to claim 5, it is characterised in that described device, also includes:
Digit detection module, for being used to store single pixel point in the data field for detecting the data read module reading The number of bits of colouring information whether reach predetermined figure;
The space determining module, if being for storing single pixel point for the testing result of the digit detection module The number of bits of colouring information reaches the predetermined figure, then perform it is described will in the data field be used for store colouring information Each byte in the space that is constituted of partial binary position as data space the step of.
7. device according to claim 6, it is characterised in that described device, also includes:Difference test module and space weight True module;
The Difference test module, described in detecting the bitmap after the Data write. module write-in data and not writing Whether the color distortion degree between the bitmap of data exceedes predetermined threshold;
The true module of the space weight, during for detecting that the color distortion degree has exceeded the predetermined threshold, again by institute State in the data field of data read module reading for storing the company in each byte of colouring information since highest order The space that continuous n-1 binary digit is constituted is used as data space;The Data write. module is recycled by the needs Hiding data are write in the data space that the true module of the space weight determines.
8., according to any described device of claim 5 to 7, it is characterised in that described device, also include:Capacity calculation module With capacity check module;
The capacity calculation module, can data storage amount for calculate the data space;
The capacity check module, for detecting whether the data volume for needing hiding data can data storage more than described in Amount;If testing result be the data volume for needing hiding data more than it is described can data storage amount, can be deposited according to Storage data volume from it is described need hiding data in intercept a part of data as needing hiding number described in the bitmap According to.
CN201410299236.XA 2014-06-26 2014-06-26 Data-hiding method and device based on bitmap Active CN104112100B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410299236.XA CN104112100B (en) 2014-06-26 2014-06-26 Data-hiding method and device based on bitmap

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410299236.XA CN104112100B (en) 2014-06-26 2014-06-26 Data-hiding method and device based on bitmap

Publications (2)

Publication Number Publication Date
CN104112100A CN104112100A (en) 2014-10-22
CN104112100B true CN104112100B (en) 2017-06-16

Family

ID=51708885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410299236.XA Active CN104112100B (en) 2014-06-26 2014-06-26 Data-hiding method and device based on bitmap

Country Status (1)

Country Link
CN (1) CN104112100B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106056530B (en) * 2016-06-01 2019-12-06 腾讯科技(深圳)有限公司 Method and device for displaying picture content in application
CN110647377A (en) * 2019-09-29 2020-01-03 上海沣沅星科技有限公司 Picture processing system, device and medium for human-computer interaction interface
CN112017099B (en) * 2020-09-03 2023-12-15 山东省计算中心(国家超级计算济南中心) Method and system for hiding and analyzing program codes in image

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1374628A (en) * 2002-04-19 2002-10-16 中山大学 Distortion-free data-hiding method
CN1406054A (en) * 2002-11-06 2003-03-26 中山大学 Distortion-less data concealing method for pseudo-color format picture
CN101840564A (en) * 2010-05-07 2010-09-22 南京大学 Method for hiding mass information by using remote sensing image
CN102263879A (en) * 2010-05-27 2011-11-30 郭景明 Image data processing system and related data hiding method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1374628A (en) * 2002-04-19 2002-10-16 中山大学 Distortion-free data-hiding method
CN1406054A (en) * 2002-11-06 2003-03-26 中山大学 Distortion-less data concealing method for pseudo-color format picture
CN101840564A (en) * 2010-05-07 2010-09-22 南京大学 Method for hiding mass information by using remote sensing image
CN102263879A (en) * 2010-05-27 2011-11-30 郭景明 Image data processing system and related data hiding method thereof

Also Published As

Publication number Publication date
CN104112100A (en) 2014-10-22

Similar Documents

Publication Publication Date Title
CN105787909B (en) Image procossing for high dynamic range images
CN103209326B (en) PNG (Portable Network Graphic) image compression method
CN103238169B (en) Pixel on display is reproduced
US11908107B2 (en) Method and apparatus for presenting image for virtual reality device, device and non-transitory computer-readable storage medium
CN104112100B (en) Data-hiding method and device based on bitmap
CN111325271A (en) Image classification method and device
CN101802872A (en) Depth buffer compression
KR20090092035A (en) Method for generating mosaic image and apparatus for the same
CN104574358A (en) Method and apparatus for scene segmentation from focal stack images
US20200184098A1 (en) Systems and Methods for Secure Obfuscation of Sensitive Information in Images
CN109257168A (en) A kind of generation method of picture validation code, device, equipment and medium
CN109752870A (en) Electrophoresis electronic paper ghost detection system and detection method
CN109803172A (en) A kind of processing method of live video, device and electronic equipment
CN106534667A (en) Distributed cooperative rendering method and terminal
TWI376648B (en) Method and device for keeping image background by multiple gauss models
CN107564063A (en) A kind of virtual object display methods and device based on convolutional neural networks
CN107027069B (en) Processing method, device and system, storage medium and the processor of image data
CN108615076A (en) A kind of data store optimization method and apparatus based on deep learning chip
US10418000B2 (en) Method and apparatus for screen capture on a display device
CN111353965B (en) Image restoration method, device, terminal and storage medium
CN106204672A (en) Texture compression document generating method
CN107204024A (en) Handle the method and device of sequence of pictures frame
CN108877030A (en) Image processing method, device, terminal and computer readable storage medium
CN110705653A (en) Image classification method, image classification device and terminal equipment
CN114138215A (en) Display method and related equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 511446 Guangzhou City, Guangdong Province, Panyu District, South Village, Huambo Business District Wanda Plaza, block B1, floor 28

Applicant after: Guangzhou Huaduo Network Technology Co., Ltd.

Address before: 510655, Guangzhou, Whampoa Avenue, No. 2, creative industrial park, building 3-08,

Applicant before: Guangzhou Huaduo Network Technology Co., Ltd.

CB02 Change of applicant information
GR01 Patent grant