The method that the digital image file of multiplexing digital photo frame is synthetic
Technical field
The present invention relates to a kind of digital image file synthetic technology, be meant a kind of argument sequence that in the electronic pictures file, embeds its content especially, for still photo cooperates reusable " photo frame " image, thereby allow the user replace personalized photo like a cork, the method for multiplexing effectively " photo frame "; Belong to digital image processing techniques.
Background technology
Development of computer has greatly been enriched mode and ability that people carry out information interchange, and the distance that people carry out information interchange has been shortened in the progress of network technology then magically.At present, mobile communication, Email have goed deep into daily life, people do not satisfy and only limit to exchanging of voice and literal, therefore, the image information that adds abundant image among the information that people exchange mutually can make people obtain more excellent multimedia experience, abundanter expression way and more effective communicative effect.Digital camera, multimedia computer, broadband are interconnected, the appearance of colour screen handset, multimedia message service, and the people that make have entered one " interpreting blueprints epoch ".
Contain abundant vivid information in the image, these information play irreplaceable effect in some occasion of interpersonal communication.For example, whenever festivals or holidays, exquisite beautiful greeting card is the usual way that people greet each other; In the daily life, various card, souvenir photograph also usually are the instruments that people convey feeling and ideas.Enter CYBERSPACE, the use of digital technology make electronic card, digital photo transmission and the exchange more quick and easy, cheap.
People can pass own or kith and kin's photo by the network family at present, use Email (email) or MMS (Multimedia Message Service is called for short MMS) just can conveniently exchange.Referring to Fig. 1, this is a child's a photo, it is made up of child's head portrait, background, has shown this child the happy smile of festive occasion, is the balloon etc. of a plurality of expression festive air around its head portrait.
But the e-greeting card that designs and produces a fineness as shown in Figure 1 is also remarkable, often needs the personnel with professional knowledge or technical ability to utilize the instrument of specialty just can make.Usually need the synthesizing mean of specialty to realize.And synthetic later image can not be revised.
A scheme improving the problems referred to above is: specialized company designs the general template of some electronics, and keeps certain space and utilize own image processing software interpolation personalized photo for the user; This method has proposed higher requirement to the user, and needs more professional operation just can finish.Simultaneously, in case this image is added individualized content, it is an image that template and individual pictures will be synthesized, and just is difficult to later on accurately be separated.Thereby in case the picture after should synthesizing is sent to other people, the recipient is difficult to its change and reuses.If the recipient likes similar background image, then also need to visit the original image storehouse, therefrom seek original " totally " template and carry out the synthetic operation of oneself more again, obviously, this scheme is inconvenient in the use, and the efficient of making is extremely low, also can't avoid for the waste of resource.
In addition, mixing suitable photo frame for a width of cloth still photo increases interpolation special efficacy such as " be fade-in fade-out " again and can itself add much beauty to for this photo.Not only waste time and energy yet design beautiful photo frame, the effect control of adding " being fade-in fade-out " is complicated more, therefore, can not obtain corresponding effects if the user does not grasp certain skill in design.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of synthetic method of digital image file of multiplexing digital photo frame, allows the user add oneself personal images or photo like a cork in the photo frame that it is liked, and makes photo frame to reuse.
Another object of the present invention is to provide a kind of synthetic method of digital image file of multiplexing digital photo frame, on the basis of reusable photo frame, increase the special efficacy of adding " being fade-in fade-out ", make entire image have more vividness and affine effect.
The object of the present invention is achieved like this:
The method that a kind of digital image file of multiplexing digital photo frame is synthetic, described digital image file comprises a frame picture at least, and this picture is made up of digital picture, photo frame member; Wherein: the photo frame member is made up of photo frame image, internal image, photo frame member display position parameter and the photo frame shape information in digital picture;
The synthetic method of the digital image file of above-mentioned multiplexing digital photo frame is specially:
Step 1: electronic equipment extracts display position parameter and the shape information in the photo frame member from the digital image file that receives;
Step 2: electronic equipment uses the new digital picture of appointment to replace former digital picture;
Step 3: electronic equipment is replaced the image that described new digital picture is positioned at photo frame image display position according to photo frame member display position parameter and photo frame shape information with the photo frame image;
Step 4: electronic equipment with the display position parameter of photo frame member and shape information and new digital image recording in the respective picture frame of newly-generated digital image file.
In addition, digital picture of the present invention can be a personalized image data members, and this personalized image data members is formed by the personalized image data and with these personalized image data parameter that is mutually related at least; These parameters are one or more numerical value, more than one numerical value constitutes a sequence, be used for putting down in writing particular location and/or the shape of described personalized image data, and be recorded on the assigned position in the digital image file by electronic equipment or be stored in the network at image frame.
In order to save the space that is used for store electrons photo frame shape information in the digital image file, also further comprise the luminance parameter that is used to control this photo frame or internal image in the described photo frame member.
When comprising the above picture of a frame in the digital image file, the photo frame of each frame picture or the brightness value of internal image are set to difference, and original simultaneously photo frame shape information is set to zero or empty; When extracting photo frame, adopt method of difference to carry out, concrete extraction step is as follows:
Step 11: electronic equipment subtracts computing with the view data of adjacent two frame pictures in the digital image file;
Step 12: after two frame pictures subtracted each other, the pairing position of the view data that its luminance parameter changes was photo frame or internal image zone.
Electronic equipment of the present invention is at least: digital camera, multimedia computer, colour screen handset, palm terminal device.
Method disclosed by the invention has increased background/photo frame member in image file, allow the user can add oneself personal images or photo like a cork in the photo frame that it is liked, and makes photo frame to reuse.In addition, the present invention has increased luminance parameter in above-mentioned component diagram picture, make the brightness of different frame can be set to difference, therefore, Alternation Display by different frame, can on the basis of reusable photo frame, increase the special efficacy of adding " being fade-in fade-out ", make entire image have more vividness and affine effect; The more important thing is: by analyzing prefabricated parametrization luminance difference, follow-up user can utilize simple inter-frame difference method to extract any complicated photo frame that is stored in the image effectively, thereby, concerning the deviser, need not encode separately and store the shape of photo frame, save storage space effectively, made things convenient for the multiplexing of photo frame.
Description of drawings
The image that Fig. 1 is synthesized by photo frame, background image and personalized image data members for the present invention;
Fig. 2 is the photo frame component diagram picture of one embodiment of the invention;
Fig. 3 is the background frame of one embodiment of the invention;
The image that Fig. 4 is synthesized by photo frame member shown in Fig. 2,3 and background for the present invention;
Fig. 5 for the present invention by another synthetic image of photo frame and background image data member (have change luminance parameter);
Fig. 6 is the different display effect of Fig. 1 brightness of image;
Fig. 7 is for carrying out the synthetic process flow diagram of photo frame in the present invention's one specific embodiment;
Fig. 8 carries out the process flow diagram that photo frame extracts when being used for the resource multiplex purpose for the present invention.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing and specific embodiment:
Referring to Fig. 2,3,4, for synthetic picture shown in Figure 4, the digital picture of one embodiment of the present of invention should comprise at least: a reusable photo frame member, its image as shown in Figure 2, and digital picture shown in Figure 3; Photo frame member and digital picture synthesize the picture with photo frame shown in Figure 4.Wherein, the photo frame member is made up of photo frame image, photo frame member display position parameter and the photo frame shape information in digital picture; Wherein, the picture of photo frame image for forming by versicolor colored balloon, the display position parameter of photo frame member is following set:
{(A1,B1),(A2,B2)}
Wherein, (A1, B1), (A2, B2) are respectively the coordinate figures in this member upper left corner and lower right corner in whole digital picture.
When synthesizing above-mentioned digital picture, at first, from the digital image file that receives, extract display position parameter and shape information in the photo frame member; The digital picture that re-uses is as shown in Figure 3 replaced former digital picture; Then according to photo frame member display position parameter (A1, B1), (A2 B2) and the photo frame shape information, replaces the image that described new digital picture is positioned at photo frame image display position with the photo frame image; At last, with the display position parameter of photo frame member and shape information and new digital image recording in the respective picture frame of newly-generated digital image file.
Need to prove: in a photo frame with regular shape, its shape information is less relatively, can be recorded in the entire image file, for example: a photo frame that is shaped as rectangle (or triangle), its form parameter is the upper left corner and lower right corner coordinate (or coordinate of three fixed points), and modification information can directly be stored in the remarks district or photo frame image appointed positions of digital image file.For photo frame, need the periphery of pointwise record photo frame and interior shape or with its outline line of complex mathematical function representation with complicated shape.Photo frame inside can represent or be set to transparently that the purpose of doing like this is more convenient in order to handle when the composograph with the color (for example, black) of regulation.For example: when new digital picture and photo frame image are synthesized, the color or the transparency of each point in the photo frame judged in pointwise, if for formulating color (Gui Ding black as mentioned) or its transparency is that full impregnated is bright, show that this position is the position of the inside of photo frame, then use the pixel of new digital picture data of corresponding positions, otherwise use in the photo frame data of corresponding positions as the pixel of composograph as composograph.
Simplify the shape coding of photo frame simultaneously in order to enrich the effect that shows, can in described image file, further increase the luminance parameter that is used to control photo frame or background image.When comprising the above picture of a frame in the digital image file, the brightness value of each frame picture photo frame or background image can be set to difference; When showing entire image, can realize adding the display effect of " being fade-in fade-out " like this.Referring to Fig. 4,5, two frame backgrounds have the picture display effect of different brightness in Here it is the same digital image file.The luminance parameter here can be recorded among the newly-generated digital image file.
Using the largest benefit of luminance parameter on technical standpoint is explicit coding and the storage that can omit the photo frame shape.For example, if digital image file comprises two frame pictures, and the brightness difference of the content regions image of two width of cloth pictures, just can extract the shape information of described photo frame image by the method for difference, concrete extraction step is as follows:
Step 11: the view data of adjacent two frame pictures in the digital image file is subtracted computing;
Step 12: after two frame pictures subtracted each other, the pairing position of the view data that its luminance parameter changes was the background area; Otherwise be the photo frame zone.
Because the invariant position of photo frame and background, and variation has taken place in the brightness of background in two frames of front and back, so subtract each other the shape that invariant region among the result is photo frame.Use the frame difference method to obtain the shape information of member, effectively the reduced parameter table is saved storage space.
In order further to save the space of in digital image file, storing above-mentioned parameter and shape information, described parameter and the shape information integral body form with Parameter File can be stored in the network, in digital image file, only write down the network address of depositing this Parameter File, when needs extract these parameters and shape information, this network address information is read in relevant position from digital image file earlier, and then according to this corresponding address, message reference internet; At last, from the data file that is stored in this address, read relevant parameters and information.
For example: described parameter and information are stored in certain website with text-only file Greeting.txt form: lib.eCardxxx.com, its reference address are lib.eCardxxx.com/Greeting.txt; This character string is written in the attribute area of final digital image file.When multiplexing this photo frame of needs, the user utilizes client software prefabricated in the mobile phone, at first read above-mentioned reference address lib.eCardxxx.com/Greeting.txt from this digital image file, then by GPRS (GeneralPacket Radio Service, abbreviation GPRS) mode is connected into the internet, visit this image data file http://lib.eCardxxx.com/Greeting.txt with HTML (Hypertext Markup Language) (Hypertext Transfer Protocol is called for short HTTP).Can also can obtain each parameter and shape information in the digital image file easily by storing and read the network address of embedding thus, finish the personalized transformation of the way.
Referring to Fig. 6, further, above-mentioned digital picture can be a personalized image data members, and this personalized image data members is formed by the personalized image data and with these personalized image data parameter that is mutually related at least.This personalized image data members parameter is one or more numerical value, is used for putting down in writing particular location and/or the shape of described personalized image data at image frame, and is recorded on the assigned position in the digital image file or is stored in the network.When described personalized image data members argument sequence was stored in network, its network address was recorded to the position of stipulating in the image file.
When extracting described personalized image data members parameter, at first this network address information is read in the position of this argument sequence of storage from image file, then according to this corresponding address, message reference internet; At last, from the data file that is stored in this address, read corresponding member parameter.
Fig. 7 is for carrying out the synthetic process flow diagram of photo frame in the present invention's one specific embodiment; In being provided with the mobile phone of image synthesizing software of the present invention, choose a photo, by this software this photo is processed into two different width of cloth images of luminance parameter, be defined as brightness 1 and brightness 2 respectively, choose a photo frame image again, this photo frame image superposes with two two field pictures with brightness 1 and brightness 2 respectively, obtains first two field picture and second two field picture after the stack respectively, two two field pictures is recorded in the corresponding animated image file again.By the Alternation Display of different frame image, can on the basis of reusable photo frame, increase the special efficacy of adding " being fade-in fade-out ", make entire image have more vividness and affine effect.
When using mobile phone to receive the image that a width of cloth synthesizes by flow process shown in Figure 7,, can obtain the photo frame image by flow process shown in Figure 8 if when the user wants to re-use the photo frame of this image.
As shown in Figure 8, carry out the process flow diagram that photo frame extracts when being used for the resource multiplex purpose, obtain the first different two field picture of luminance parameter and second two field picture according to raw image files, wherein, the luminance parameter of first two field picture is defined as brightness 1, the luminance parameter of second two field picture is defined as brightness 2, and second two field picture that will have first two field picture of brightness 1 then and have brightness 2 is done and is subtracted computing, and the pairing position of the view data that its luminance parameter changes is exactly the background area; The pairing position of the view data that luminance parameter does not change is the photo frame zone, obtains the profile information of photo frame thus.Like this, effective simplification parameter list, saved storage space, and made things convenient for the user to extract photo frame greatly.
Obviously: the process shown in Fig. 7,8 can be used on the computing machine that intercoms mutually by network, palm PC equally, and process and the above embodiments of its processing are identical, repeat no more herein.
Technological means essence provided by the invention is a kind of stencil design and multiplexing scheme, strengthens resource multiplex.In described electronic pictures inside, utilize the geometry or the abundant animation effect of color transformed formation of basic building block; In the communication process of electronic pictures, utilize the displacement of member and the multiplexing purpose that reaches the quick personalized transformation of the way of transformation parameter.The present invention is simple in structure, economical and effective.Owing to adopt standard image files form (JPG, GIF etc.), resources such as the image that extensively exists, animation all can be utilized to carry out the personalization transformation at present, simultaneously, it is compatible widely that newly-generated picture still keeps, and can be shown, transmit, store by the standard soft hardware equipment.
It should be noted that at last: above embodiment only in order to the explanation the present invention and and unrestricted technical scheme described in the invention; Therefore, although this instructions has been described in detail the present invention with reference to each above-mentioned embodiment,, those of ordinary skill in the art should be appreciated that still and can make amendment or be equal to replacement the present invention; And all do not break away from the technical scheme and the improvement thereof of the spirit and scope of the present invention, and it all should be encompassed in the middle of the claim scope of the present invention.