Summary of the invention
Technical problem underlying to be solved by this invention provides a kind of dynamic display method and browser of digital image display device still image, can play panoramic picture on the undersized digital image display device easily having, the details of image can not lost, for providing, the user enriches image information careful, complete display, and easy operating control.
Another technical matters to be solved by this invention provides a kind of dynamic display method and browser of digital image display device still image, with the static image file is object, can reduce the storage data volume and the calculated amount of image effectively, adopt single image buffers and display position parameter regularly to upgrade the program compact efficient.
Another technical matters to be solved by this invention provides a kind of dynamic display method and browser of digital image display device still image, adopt parallel processing and mutual control, display format is abundant flexibly, be installed on the mobile communication terminal, make the user of mobile communication terminal can transmit and appreciate panoramic picture easily mutually.
The present invention solves the problems of the technologies described above by the following technical solutions:
A kind of dynamic display method of still image adopts parallel processing, and by operations such as controlled variable, regularly renewal, boundary treatment are set, the Interactive Dynamic of finishing the large format distant view photograph shows, comprises following step:
At first, carry out initialization operation, that is: panoramic picture to display is stored in the panoramic picture buffer zone of digital image display device, position counting numerical value is set to the positional value that this panoramic picture shows at first, simultaneously, speed control numerical value is set to default in advance value;
Secondly, detect processing, that is: detect the size that leaves panoramic picture to display in the described panoramic picture buffer zone in, with the display direction of definite this panoramic picture, and according to this display direction initialization direction control information;
Then, carry out play operation, that is: from the panoramic picture buffer zone, take out the image block content that is complementary with the current screen viewing area according to broadcast state information of setting and position counting numerical value, and described image block content is sent to the display buffer;
At last, regularly the position count value is upgraded, be arranged in the reference position of panoramic picture, repeat play operation with the image block of determining less important demonstration down.
In order to realize above-mentioned method, the present invention also comprises in order to realize the browser of said method.Adopt parallel processing structure, add the read-write of independent clock and register, single image buffer storage and display buffer regularly upgrade, and the Interactive Dynamic of finishing the large format distant view photograph shows, realizes the computer control system that a kind of hardware and software that has sequential control and mutual control concurrently combines.
This browser is made up of display buffer unit, display unit, image storage unit, control module, control button; Wherein, control module receives and is sent to the display buffer unit after the signal of controlling the button transmission takes out the panoramic picture of storing in the image storage unit and handle, and display unit takes out corresponding image and shows from described display buffer unit; In order to realize described broadcast, browser of the present invention also is provided with:
Display image buffer zone, control module take out the panoramic picture that will play from described image storage unit, be stored in this display image buffer zone;
The direction control register, control module detects the picture size of depositing in the display image buffer zone when initialization, determine the display direction of acquiescence according to this picture size, and will be used for presentation video and play the state value of direction and store described direction control register into;
Location counter is used for writing down the position coordinates of current display image piece at panoramic picture; Control module calculates image block to display position according to its position coordinates, and controls its renewal;
The speed control register is used to preserve the velocity amplitude that the panoramic picture that is played rolls on the display buffer;
Control module is according to canned data in location counter, direction control register and the rolling speed controller, the position of the image block that calculating will show in panoramic picture, according to result of calculation, from described display image buffer zone, take out described image block, this image block is sent among the described display buffer unit the last location counter that regularly upgrades;
Timer, this timer are decided the compartment of terrain and are sent timing signal to described control module; After control module receives this timing signal, according to canned data in location counter, direction control register and the speed control register, recomputate the position of image block in panoramic picture that will show, the image block content in the update displayed buffer cell.
The present invention is by above-mentioned technical scheme, make the user to play panoramic picture on the undersized digital image display device easily having, the details of panoramic picture can not lost, make full use of the equipment limited resources, take into account details and global information, and the process easy operating of playing control.The present invention adopts simply, opens, technical scheme provides novel comfortable visual experience flexibly for the small screen low power consuming devices efficiently.
Because the present invention is to be object with the static image file, therefore reduced the storage data volume and the calculated amount of image effectively; At small screen device,, the user enriches image information careful, complete display for providing; Owing to adopt parallel organization and control in real time, support the mutual control that image is play, enriched the display format of image.
The user who the invention enables mobile phone or have a PDA of mobile communication function can utilize method of the present invention and browser to play the panoramic picture that is sent by other users easily.
Embodiment
The present invention is described in further detail below in conjunction with accompanying drawing and specific embodiment:
Embodiment 1
Referring to Fig. 1, Figure 1 shows that a handheld device 1, for example: mobile phone or PDA.Which is provided with: display screen 2, upper and lower, left and right four direction operating key 31,32,33 and 34, time-out/continuation Play Control button 4, and speed control key 5.On this mobile phone or PDA, width of cloth panoramic picture is as shown in Figure 2 play the operation that needs through following:
At first, the panoramic picture that play is taken out from the storer of digital image display device such as mobile phone or PDA, be stored in the panoramic picture buffer zone that is arranged on described digital image display device.In whole playing process, all be from this panoramic picture buffer zone take out corresponding image block, and the display buffer that be sent to described digital image display device realize thereafter.
Usual way is to take out and display window image block of the same size continuously from entire image, shows on the fixed position of screen apace.When image block continuously when obtaining from left to right and show, form the dextrosinistral mobile effect of image on the screen.It realizes process flow diagram as shown in Figure 3.This method is simple, for example can finish with a FOR loop statement in c language (a kind of computer programming language) and continuous read and show.But this method belongs to single task mechanism, monopolizes system resource, does not support concurrent event, is unfavorable for realizing user's mutual control.
The present invention adopts parallel mechanism, and controlled variable is set, and uses operations such as regularly renewal, boundary treatment, and the Interactive Dynamic of finishing distant view photograph shows.
Referring to Fig. 4, a concrete implementing procedure of the inventive method is as follows:
At first, carry out initialization operation, that is: panoramic picture to display is stored in the panoramic picture buffer zone of digital image display device, position counting numerical value is set to the positional value that this panoramic picture shows at first, simultaneously, speed control numerical value is set to default in advance value;
Then, detect processing, that is: detect the size that leaves panoramic picture to display in the described panoramic picture buffer zone in, with the display direction of definite this panoramic picture, and according to this display direction initialization direction control numerical value;
Then, carry out play operation, that is: from the panoramic picture buffer zone, take out the image block content that is complementary with the current screen viewing area according to control information of setting and position counting numerical value, and described image block content is sent to the display buffer;
At last, the position count value is carried out timing upgrade, be arranged in the reference position of panoramic picture with the image block of determining less important demonstration down, repeat play operation, this step operation is regularly to activate by a timer that has started.
Above-mentioned procedure for displaying and user's control is separate, that is: the user can press any time control button come controlled variable such as change speed, direction, rolling type.User's change comes into force when the renewal next time of position count value.So, clear, simple for structure, the flexible operation of the responsibility of " demonstration " and " control ".
Provide specific descriptions and explanation below in conjunction with example.
At first, when this panoramic picture is read described panoramic picture buffer zone, correspondingly also need position count value and speed control numerical value are carried out the initialization setting.Wherein, position counting numerical value is used for indicating the reference position coordinate of the current image block that broadcasts of panoramic picture.When initialization, this position counting numerical value is set to 0, and the image block of indicating to show is positioned at the reference position of panoramic picture.In follow-up playing process, this position counting numerical value is constantly made amendment according to certain rule, thereby, make the content of image block change according to corresponding rule, reach the played in order panoramic picture each several part purpose of (claiming roll display again).Speed control numerical value is carried out the initialization setting, is for the broadcasting speed of panoramic picture is controlled or regulated.Therefore, before playing beginning, also need for speed control numerical value is provided with an initial numerical value, this numerical value can be set in advance by the user, also can be the numerical value of a prior acquiescence that is provided with in the described digital image display device.
After having finished above-mentioned initialization step, also need the display direction of panoramic picture is determined.This be because: the size that panoramic picture generally can show greater than the display buffer of mobile phone or PDA, and especially when described panoramic picture is taken generation by mobile phone or PDA, panoramic picture or measure-alike with the respective direction of mobile phone or PDA display buffer in the horizontal direction or in vertical direction, and on another direction, its size but is far longer than mobile phone or the PDA display buffer size on this direction.In addition, some panoramic pictures still all are not equal to mobile phone or the PDA display buffer size in respective direction in the horizontal direction in vertical direction.Because above-mentioned situation need detect the size of panoramic picture, determine its roll display direction on mobile phone or PDA display buffer according to the result who is detected.
Concrete way is: detect the size that leaves panoramic picture to display in the panoramic picture buffer zone in, obtain the lateral dimension and the vertical dimension of this panoramic picture; Then, calculate panoramic picture lateral dimension and the ratio of vertical dimension and the ratio of mobile phone or PDA display buffer lateral dimension and vertical dimension; If the ratio of the lateral dimension of panoramic picture and vertical dimension is not less than the ratio of screen level size and vertical dimension, illustrate: have relatively large demonstration length on this panoramic picture horizontal direction, therefore the display direction of panoramic picture should be defined as horizontal direction; Otherwise then the display direction of this panoramic picture is defined as vertical direction.After having determined display direction, correspondingly need to be provided with the direction control information, make in follow-up play operation, can be according to the renewal of this direction control information control position count value, and then the operation of the image block that will show is taken out in influence from the panoramic picture buffer zone.
Above-mentioned work be set finish after, then begin the concrete operation that displays the play, specifically be from the panoramic picture buffer zone, to take out the image block content that is complementary with on-screen display (osd) area according to the current location count value, and described image block content is sent to the display buffer shows, periodically prepare next time demonstration then according to broadcast state information updating current location count value.
Below describe in detail with a concrete broadcast example.The basic condition of this example is as follows: a width of cloth panoramic picture, the ratio of its horizontal direction size and vertical direction size is greater than the ratio of display buffer horizontal direction size and vertical direction size, and, measure-alike on this direction of the size of this panoramic picture vertical direction and display buffer, therefore can determine: the optimum orientation of broadcast is a horizontal direction.In initialized process, the direction control information is set to from left to right.
For the first time during playing image, because position counting numerical value is 0, then the high order end from the panoramic picture buffer zone takes out the image block identical with the display buffer size earlier, and this image block is delivered to the display buffer, thereby finishes the broadcast of the image first time.
After finishing playing for the first time, position counting numerical value need be upgraded, concrete renewal process is with this position counting numerical value and an offset addition, obtains new position counting numerical value.Here said side-play amount is exactly above-mentioned speed control numerical value, this speed control numerical value is the velocity amplitude that the image block that is sent to the display buffer moves by the direction of appointment in the direction control information (this example for from left to right) in panoramic picture at every turn, can represent with pixel count.
In follow-up image is play, then can come the assigned address from the panoramic picture buffer zone to take out the image block identical according to the position counting numerical value after upgrading with the display buffer size, deliver to the display buffer.
Because the size of described panoramic picture is limited, therefore, after several times are play, shown image can arrive the border of panoramic picture on the display buffer, at this moment, if continue the position count value to be upgraded according to above-mentioned method, disposable taking-up complete image piece to display from described panoramic picture more then.Therefore, must monitor, and then prepare suitable image block according to the result of monitoring and be used for showing, and how control is upgraded the position count value " border " that whether shown image block arrives panoramic picture.For example,, can revise the direction control information, follow-up broadcast be begun again from left to right or broadcast in the other direction according to the result of monitoring in order when the image block that is shown arrives " border " of panoramic picture, automatically to change the direction of broadcast.
Boundary treatment during image shows is as follows:
At first according to the current location count value, whether the image block that detection will show surpasses the border of described panoramic picture.Shown in figure five,
Position counting numerical value is designated as: (X Y), is designated as W and H with the wide and height that is written into image, and the wide and height of image display window is designated as w and h.The concrete operations of bounds checking are:
If the value of direction control information is a level, the size of W and X+w relatively, if W>X+w, the expression current location does not arrive the border, otherwise shows and cross the border.
If the value of direction register is vertically, the size of H and Y+h relatively, if H>Y+h, the expression current location does not arrive the border, otherwise shows and cross the border.
If do not cross the border as yet, then from described panoramic picture buffer zone, take out the image block content that is complementary with current display buffer according to this position counting numerical value, described image block content is sent to the display buffer shows.
If cross the border, from the panoramic picture buffer zone, take out the residual image that this represented position of position counting numerical value begins, and the respective image that reference position begins in this panoramic picture buffer zone, and it is combined as is sent to the display buffer after the shown image block content and shows.As shown in Figure 5, at first zoning A in the position of image afterbody (horizontal coordinate X to W) and area B in the position of image front portion (horizontal coordinate 0 is to W+w-W); The content of regional then A and B is taken out from image buffers and is sent into display buffer by A, B order and form complete border transition district picture, upgrades screen display.
Boundary treatment in the position renewal is as follows:
At first, calculate the algebraic sum of described position counting numerical value and speed control numerical value, and it is carried out modulo operation with the size of described panoramic picture on this display direction, obtain the preset position count value according to the direction control information; For example, speed control numerical value is designated as D, the current location count value be designated as (X, Y), the preset position count value be designated as (x, y),
If the direction control information be level to the right, x=(X+D) %W, y=Y;
If the direction control information be level left, x=(X-D) %W, y=Y;
If the direction control information is for straight down, x=X, y=(Y+D) %H;
If the direction control information is for straight up, x=X, y=(Y-D) %D.
Above-mentioned % represents modular arithmetic.
Then according to current location count value and above-mentioned preset position count value, utilize the above-mentioned detection method of crossing the border further to judge following situation: the image block of current location count value correspondence does not cross the border, but the image block of preset position count value correspondence crosses the border;
If belong to above-mentioned situation, and described broadcast state information indicates that for " mode of rebounding " then the direction control information is set to the opposite direction value of current direction, does not change the current location count value;
Otherwise, upgrade the position count value with above-mentioned preset position count value.
In above-mentioned embodiment, all be measure-alike with the size of panoramic picture in vertical direction and display buffer vertical direction be example; For the size of panoramic picture in the horizontal direction with the measure-alike situation of display buffer horizontal direction, then correspondingly the content setting of direction control information is provided with, make in follow-up play operation, from the panoramic picture buffer zone, take out the image block that will show and show according to vertical direction.
Such situation is also arranged: no matter the size of described panoramic picture is in the horizontal direction still in vertical direction, all different with the corresponding size in described display buffer; For this reason, can carry out certain dwindling or processing and amplifying, make image block to display and described display buffer size be complementary image block to display.Concrete disposal route, with horizontal direction for for example down: at first, size and display buffer are at the ratio of vertical direction size in vertical direction to calculate described panoramic picture, and this ratio is the convergent-divergent control information; Then, again according to this convergent-divergent control information and display buffer in the horizontal direction size obtain and want display image piece size in the horizontal direction, and from the panoramic picture buffer zone, take out the image block that will show with this.It should be noted that: described position counting numerical value, also should carry out the equal proportion adjustment according to above-mentioned convergent-divergent control information.The convergent-divergent of vertical direction is handled identical with horizontal direction, is not giving unnecessary details at this.
Above-mentioned convergent-divergent is handled, also can carry out according to the scaling that the user sets in advance, these scalings are set to the convergent-divergent control information, and concrete convergent-divergent is handled identical with the above embodiments, and scaled images piece and described display buffer size are complementary.
For the user when playing described panoramic picture, can control the direction of its broadcast, speed etc., the control button that the present invention also further presses the user in the process of playing detects in real time, and carries out corresponding process operations according to following various schemes:
If detect the direction push button signalling of user, then and correspondingly revise the direction control information by the digital image display device input; If detect the pause button signal of user, then correspondingly suspend or recover the broadcast of panoramic picture by the digital image display device input.
If detect the speed control push button signalling of user, then, revise speed control numerical value correspondingly according to the pairing velocity amplitude of push button signalling that receives by the digital image display device input; Perhaps, if detect the direction push button signalling of user, and revise corresponding speed control numerical value accordingly according to the time length of pressing directionkeys by the digital image display device input.
User's change comes into force when the renewal next time of position count value.
In order to make the speed of playing panoramic picture even, should make each time and equate to the time interval of display buffer transmitted image piece, achieve this end, need periodically described position counting numerical value to be upgraded, carry out corresponding play operation after the renewal immediately.Circulation just can realize that the panoramic picture broadcasting speed is even so repeatedly.Usually, in described digital image display device, all has clock signal, the present invention utilizes this clock signal to carry out timing, program when certain for example is set, this timed sequence sends timing signal at interval according to a regular time, when receiving this timing signal, start renewal operation to described position counting numerical value, so just can realize that the broadcasting speed of panoramic picture is even.Can when receiving this timing signal, be 0 also, perhaps the position count value not done the operation of renewal, so just can realize the effect that the broadcast of panoramic picture suspends the speed control information setting.
Embodiment 2
Referring to Fig. 6, another embodiment of the present invention discloses a kind of image viewer of playing panoramic picture, and this browser is made up of display buffer unit, display unit, image storage unit, control module, control button; Wherein, control module receives and is sent to the display buffer unit after the signal of controlling the button transmission takes out the panoramic picture of storing in the image storage unit and handle, and display unit takes out corresponding image and shows from described display buffer unit; In addition, this browser also is provided with display image buffer zone, direction control register, location counter, speed control register etc., and control module takes out the panoramic picture that will play from described image storage unit, be stored in this display image buffer zone; And when initialization, detect the picture size of depositing in the display image buffer zone, determine the display direction of acquiescence, and will be used for presentation video and play the state value of direction and store described direction control register into according to this picture size; Location counter is used for writing down the position coordinates of current display image piece at panoramic picture; Control module then calculates the particular location of image block to display in described panoramic picture according to this position coordinates, and controls its renewal; The speed control register is used to preserve the velocity amplitude that the panoramic picture that is played rolls on the display buffer; Control module is according to canned data in location counter, direction control register and the rolling speed controller, the position of the image block that calculating will show in panoramic picture, and according to result of calculation, from described display image buffer zone, take out described image block, this image block is sent among the described display buffer unit.Concrete operation steps is consistent with embodiment 1.
In order to produce dynamic play effect and mutual flexibly control, also be provided with timer in the present embodiment, this timer is decided the compartment of terrain and is sent timing signal to described control module; Control module is after receiving this timing signal, according to canned data in location counter, direction control register and the rolling speed controller, recomputate the position of image block in panoramic picture that will show, the image block content in the update displayed buffer cell.The user can press the control button any time the term of execution of program and come controlled variable in the control registers such as change speed, direction.User's change comes into force when the renewal next time of position count value.So, clear, simple for structure, the flexible operation of the responsibility of " demonstration " and " control ".
For example, user's control rate key, control module is according to the value of the pre-defined value change speed register of speed key.Simultaneously, clock sends timing signal to control module at set intervals regularly, and control module reading speed register upgrades location register.Owing to adopt the parallel processing mechanism of display operation and control operation, thereby after the user had upgraded the value of speed register, the velocity amplitude that control module will obtain upgrading carried out location update operations, reaches the effect of final speed control.
Actual panoramic picture is not identical at least in one direction with the display unit size of above-mentioned browser, therefore need be in the procedure for displaying of reality, image block to display is carried out certain dwindling or processing and amplifying, make image block to display and described display buffer size be complementary.Concrete disposal route, with horizontal direction for for example down: at first, size and display buffer are stored in this ratio in the convergent-divergent control register at the ratio of vertical direction size in vertical direction to calculate described panoramic picture; Then, again according to the ratio of storing in this convergent-divergent control register and display buffer in the horizontal direction size obtain and want display image piece size in the horizontal direction, and from the panoramic picture buffer zone, take out the image block that will show with this.It should be noted that: the value of storing in the above-mentioned location counter also should be carried out the equal proportion adjustment according to above-mentioned ratio.The convergent-divergent of vertical direction is handled identical with horizontal direction, is not giving unnecessary details at this.
Above-mentioned convergent-divergent is handled, also can carry out according to the scaling that the user sets in advance, these scalings are to leave in the convergent-divergent control register equally, and concrete convergent-divergent is handled identical with the above embodiments, and scaled images piece and described display buffer size are complementary.
For the state of playing being selected or being controlled, present embodiment also can be provided with the broadcast state register, be used to store broadcast mode (for example: the mode of rebounding, the recycle design etc.) state value of panoramic picture, when control module arrives the border of described panoramic picture at the image of current broadcast, can be according to the broadcast mode state value of storing in the described broadcast state register, the image block content that will show sends to the display buffer unit.Concrete processing is referring to embodiment 1.
In order to make the user when playing described panoramic picture, can control the direction of its broadcast, speed etc., also further be provided with in the present embodiment and play the direction operating key, suspend control buttons such as operating key, speed control key, when control module receives the signal of the direction button that is sent by broadcast direction operating key, then according to the state value of storing in this modification of signal direction control register; Similarly, when control module receives the halt signal that is sent by the time-out operating key, then start or suspend the renewal operation of location counter according to this halt signal; When control module receives the speed of being sent by the speed control key and adjusts signal, then adjust the velocity amplitude that the panoramic picture that is played preserved in modification of signal speed control register rolls on the display buffer according to this speed.
Speed control in the present embodiment can have dual mode at least: 1, button quantizes speed governing, make the corresponding specific velocity amplitude of button on the keyboard, after corresponding button is pressed, revise the numerical value of storing in the speed control register according to the pairing numerical value of this button again; 2, dynamics speed governing: according to the corresponding velocity amplitude of the corresponding modification of the time length of the directionkeys of pressing; Usually, the time of pressing is long, means great efforts, correspondingly the numerical value of storing in the speed control register is increased, otherwise, then correspondingly the numerical value of storing in the speed control register is reduced.
In order to make the speed of playing panoramic picture even, should make each time and equate to the time interval of display buffer transmitted image piece, achieve this end, need periodically the position counting numerical value of storing in the described location counter to be upgraded, carry out corresponding play operation after the renewal immediately.Circulation just can realize that the panoramic picture broadcasting speed is even so repeatedly.For this reason, also be provided with a timer in the present embodiment, this timer sends timing signal at interval according to a regular time, and control module is when receiving this timing signal, startup is upgraded operation to the numerical value of described location counter, so just can realize that the broadcasting speed of panoramic picture is even.Control module also can be when receiving this timing signal, and the numerical value in the speed control register is set to 0, perhaps the numerical value in the location counter do not done and upgraded operation, so just can realize the effect of the broadcast time-out of panoramic picture.
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.